minor fixes
This commit is contained in:
parent
e328ff1bbb
commit
f820b0014c
|
@ -75,4 +75,9 @@ def bf(input):
|
||||||
output += "Maximum number of steps exceeded"
|
output += "Maximum number of steps exceeded"
|
||||||
break
|
break
|
||||||
|
|
||||||
return unicode(re.sub('[\r\n\x00]', '/', output), 'iso-8859-1')[:430]
|
output = '/'.join(output.splitlines())
|
||||||
|
|
||||||
|
if output == '':
|
||||||
|
return 'no output'
|
||||||
|
|
||||||
|
return unicode(output, 'iso-8859-1')[:430]
|
||||||
|
|
|
@ -9,7 +9,7 @@ import hook
|
||||||
|
|
||||||
@hook.command(hook=r'(.*)', prefix=False, ignorebots=False)
|
@hook.command(hook=r'(.*)', prefix=False, ignorebots=False)
|
||||||
def iambuttbot(bot, input):
|
def iambuttbot(bot, input):
|
||||||
if input.nick.lower() != 'buttbot':
|
if input.nick.lower() not in ('buttbot', 'buttsbot'):
|
||||||
return
|
return
|
||||||
|
|
||||||
if '@' in input.inp or '#' in input.inp:
|
if '@' in input.inp or '#' in input.inp:
|
||||||
|
|
|
@ -20,7 +20,7 @@ def twitter(bot, input):
|
||||||
try:
|
try:
|
||||||
tweet = etree.parse(url)
|
tweet = etree.parse(url)
|
||||||
except IOError:
|
except IOError:
|
||||||
return 'RoR: XTREME scalability (twitter gave an error)'
|
return 'error'
|
||||||
|
|
||||||
if tweet.find('error') is not None:
|
if tweet.find('error') is not None:
|
||||||
return "can't find that username"
|
return "can't find that username"
|
||||||
|
|
Loading…
Reference in New Issue