From 858e9e4886c7aa8dfcace145504ff6f9fa0b1a8f Mon Sep 17 00:00:00 2001 From: Jeremy Fincher Date: Wed, 8 Sep 2004 22:57:09 +0000 Subject: [PATCH] Some slight fixes. --- plugins/MoobotFactoids.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/plugins/MoobotFactoids.py b/plugins/MoobotFactoids.py index ad3a5e4c2..26ff24e26 100644 --- a/plugins/MoobotFactoids.py +++ b/plugins/MoobotFactoids.py @@ -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): """ @@ -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]))