Fixed bug in looking up specific factoids.

This commit is contained in:
Jeremy Fincher 2003-10-08 16:24:41 +00:00
parent 206e14fcf4
commit b719ab6c24

View File

@ -196,7 +196,7 @@ class Factoids(plugins.ChannelDBHandler, callbacks.Privmsg):
irc.reply(msg,'%r could be %s' % (key, ', or '.join(factoids))) irc.reply(msg,'%r could be %s' % (key, ', or '.join(factoids)))
else: else:
try: try:
irc.reply(msg, cursor.fetchall()[number-1]) irc.reply(msg, cursor.fetchall()[number-1][0])
except IndexError: except IndexError:
irc.error(msg, 'That\'s not a valid number for this key.') irc.error(msg, 'That\'s not a valid number for this key.')
return return