fix minor bugs in suggest.py and seen.py

This commit is contained in:
Ryan Hitchman 2009-07-10 01:18:02 -06:00
parent 9f0addbca7
commit 808d049c4e
2 changed files with 3 additions and 3 deletions

View File

@ -54,7 +54,7 @@ def seen(bot, input):
if(results != None):
reltime = timesince.timesince(datetime.fromtimestamp(results[0]))
return '%s was last seen %s ago saying: <%s> %s' % \
return '%s was last seen %s ago saying: %s' % \
(query, reltime, results[1])
else:
return "I've never seen %s" % query

View File

@ -16,5 +16,5 @@ def suggest(inp):
suggestions = yaml.load(json)[1]
if not suggestions:
return 'no suggestions found'
suggestion = random.choice(suggestions)
return '#%d: %s (%s)' % tuple([int(suggestion[2]) + 1] + suggestion[0:2])
out = random.choice(suggestions)
return '#%d: %s (%s)' % (int(out[2][0]) + 1, out[0], out[1])