Fix factoids bug ,Factoids.showFactoidIfOnlyOneMatch feature is broken when used off-channel:

https://sourceforge.net/tracker/?func=detail&aid=2965589&group_id=58965&atid=489447
This commit is contained in:
Daniel Folkinshteyn 2010-04-11 01:23:27 -04:00 committed by Valentin Lorentz
parent 4cd0d19be7
commit 2d718d31bb

View File

@ -681,7 +681,7 @@ 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][0]]) self.whatis(irc, msg, [channel, 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.'))