Some slight fixes.

This commit is contained in:
Jeremy Fincher 2004-09-08 22:57:09 +00:00
parent a9cf06ebca
commit 858e9e4886
1 changed files with 5 additions and 2 deletions

View File

@ -373,6 +373,9 @@ class MoobotFactoids(callbacks.PrivmsgCommandAndRegexp):
irc.error("Spurious type from _parseFactoid.")
return True
# XXX It looks like all these could be converted to use invalidCommand
# instead, which would then also allow nested commands. Strike may want
# to consider that implementation method.
def addFactoid(self, irc, msg, match):
r"^(?!\x01)(.+?)\s+(?:is|_is_)\s+(.+)"
# First, check and see if the entire message matches a factoid key
@ -609,8 +612,9 @@ class MoobotFactoids(callbacks.PrivmsgCommandAndRegexp):
"""
self._lock(irc, msg, args, False)
class MostException:
class MostException(Exception):
pass
def most(self, irc, msg, args):
"""<popular|authored|recent>
@ -627,7 +631,6 @@ class MoobotFactoids(callbacks.PrivmsgCommandAndRegexp):
limit = self.registryValue('mostCount', channel)
irc.reply(method(channel, limit))
def _mostAuthored(self, channel, limit):
results = self.db.mostAuthored(channel, limit)
L = ['%s (%s)' % (ircdb.users.getUser(t[0]).name, int(t[1]))