Bugfix. I can't test this on my laptop, so expect a couple more of these.

This commit is contained in:
Jeremy Fincher 2004-07-02 14:08:19 +00:00
parent 88751622c7
commit e5e1f2e84e

View File

@ -165,7 +165,7 @@ class Factoids(plugins.ChannelDBHandler, callbacks.Privmsg):
LIMIT 20""", key) LIMIT 20""", key)
return [t[0] for t in cursor.fetchall()] return [t[0] for t in cursor.fetchall()]
def _replyFactoids(self, irc, key, factoids, number=0, error=True): def _replyFactoids(self, irc, channel, key, factoids, number=0, error=True):
if factoids: if factoids:
if number: if number:
try: try:
@ -195,7 +195,7 @@ class Factoids(plugins.ChannelDBHandler, callbacks.Privmsg):
if self.registryValue('replyWhenInvalidCommand', channel): if self.registryValue('replyWhenInvalidCommand', channel):
key = ' '.join(tokens) key = ' '.join(tokens)
factoids = self._lookupFactoid(channel, key) factoids = self._lookupFactoid(channel, key)
self._replyFactoids(irc, key, factoids, error=False) self._replyFactoids(irc, channel, key, factoids, error=False)
def whatis(self, irc, msg, args): def whatis(self, irc, msg, args):
"""[<channel>] <key> [<number>] """[<channel>] <key> [<number>]
@ -219,7 +219,7 @@ class Factoids(plugins.ChannelDBHandler, callbacks.Privmsg):
else: else:
number = 0 number = 0
factoids = self._lookupFactoid(channel, key) factoids = self._lookupFactoid(channel, key)
self._replyFactoids(irc, key, factoids, number) self._replyFactoids(irc, channel, key, factoids, number)
def lock(self, irc, msg, args): def lock(self, irc, msg, args):
"""[<channel>] <key> """[<channel>] <key>