minor fixes

This commit is contained in:
Ryan Hitchman 2009-05-14 21:07:31 -06:00
parent e328ff1bbb
commit f820b0014c
3 changed files with 8 additions and 3 deletions

View File

@ -75,4 +75,9 @@ def bf(input):
output += "Maximum number of steps exceeded"
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]

View File

@ -9,7 +9,7 @@ import hook
@hook.command(hook=r'(.*)', prefix=False, ignorebots=False)
def iambuttbot(bot, input):
if input.nick.lower() != 'buttbot':
if input.nick.lower() not in ('buttbot', 'buttsbot'):
return
if '@' in input.inp or '#' in input.inp:

View File

@ -20,7 +20,7 @@ def twitter(bot, input):
try:
tweet = etree.parse(url)
except IOError:
return 'RoR: XTREME scalability (twitter gave an error)'
return 'error'
if tweet.find('error') is not None:
return "can't find that username"