mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-27 13:19:24 +01:00
Fixed bug #800165.
This commit is contained in:
parent
3fb97984dc
commit
dab57f3080
@ -172,15 +172,16 @@ class Factoids(ChannelDBHandler, callbacks.Privmsg):
|
|||||||
if cursor.rowcount == 0:
|
if cursor.rowcount == 0:
|
||||||
irc.error(msg, 'No factoid matches that key.')
|
irc.error(msg, 'No factoid matches that key.')
|
||||||
else:
|
else:
|
||||||
counter = 0
|
|
||||||
factoids = []
|
factoids = []
|
||||||
|
counter = 0
|
||||||
for result in cursor.fetchall():
|
for result in cursor.fetchall():
|
||||||
factoids.append('(#%s) %s' % (counter, result[0]))
|
factoids.append('(#%s) %s' % (counter, result[0]))
|
||||||
counter += 1
|
counter += 1
|
||||||
totalResults = len(factoids)
|
totalResults = len(factoids)
|
||||||
if ircutils.shrinkList(factoids, ', or ', 400):
|
if ircutils.shrinkList(factoids, ', or ', 400):
|
||||||
s = '%s could be %s (%s results shown out of %s)' % \
|
s = '%s could be %s (%s shown out of %s)' % \
|
||||||
(key, ', or '.join(factoids), counter-1, totalResults)
|
(key, ', or '.join(factoids),
|
||||||
|
utils.nItems(len(factoids), 'result'), totalResults)
|
||||||
else:
|
else:
|
||||||
s = '%s could be %s' % (key, ', or '.join(factoids))
|
s = '%s could be %s' % (key, ', or '.join(factoids))
|
||||||
irc.reply(msg, s)
|
irc.reply(msg, s)
|
||||||
|
Loading…
Reference in New Issue
Block a user