mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-01-26 03:54:08 +01:00
factoids now works with sqlite3, all tests pass.
This commit is contained in:
parent
5bf71395e7
commit
b77c649c8a
@ -426,12 +426,12 @@ class Factoids(callbacks.Plugin, plugins.ChannelDBHandler):
|
|||||||
irc.reply('No keys matched that query.')
|
irc.reply('No keys matched that query.')
|
||||||
elif len(results) == 1 and \
|
elif len(results) == 1 and \
|
||||||
self.registryValue('showFactoidIfOnlyOneMatch', channel):
|
self.registryValue('showFactoidIfOnlyOneMatch', channel):
|
||||||
self.whatis(irc, msg, [results[0]])
|
self.whatis(irc, msg, [results[0][0]])
|
||||||
elif len(results) > 100:
|
elif len(results) > 100:
|
||||||
irc.reply('More than 100 keys matched that query; '
|
irc.reply('More than 100 keys matched that query; '
|
||||||
'please narrow your query.')
|
'please narrow your query.')
|
||||||
else:
|
else:
|
||||||
keys = [repr(t[0]) for t in cursor.fetchall()]
|
keys = [repr(t[0]) for t in results]
|
||||||
s = format('%L', keys)
|
s = format('%L', keys)
|
||||||
irc.reply(s)
|
irc.reply(s)
|
||||||
search = wrap(search, ['channel',
|
search = wrap(search, ['channel',
|
||||||
|
Loading…
Reference in New Issue
Block a user