mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-10 21:09:22 +01:00
Some slight fixes.
This commit is contained in:
parent
a9cf06ebca
commit
858e9e4886
@ -373,6 +373,9 @@ class MoobotFactoids(callbacks.PrivmsgCommandAndRegexp):
|
|||||||
irc.error("Spurious type from _parseFactoid.")
|
irc.error("Spurious type from _parseFactoid.")
|
||||||
return True
|
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):
|
def addFactoid(self, irc, msg, match):
|
||||||
r"^(?!\x01)(.+?)\s+(?:is|_is_)\s+(.+)"
|
r"^(?!\x01)(.+?)\s+(?:is|_is_)\s+(.+)"
|
||||||
# First, check and see if the entire message matches a factoid key
|
# 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)
|
self._lock(irc, msg, args, False)
|
||||||
|
|
||||||
class MostException:
|
class MostException(Exception):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def most(self, irc, msg, args):
|
def most(self, irc, msg, args):
|
||||||
"""<popular|authored|recent>
|
"""<popular|authored|recent>
|
||||||
|
|
||||||
@ -627,7 +631,6 @@ class MoobotFactoids(callbacks.PrivmsgCommandAndRegexp):
|
|||||||
limit = self.registryValue('mostCount', channel)
|
limit = self.registryValue('mostCount', channel)
|
||||||
irc.reply(method(channel, limit))
|
irc.reply(method(channel, limit))
|
||||||
|
|
||||||
|
|
||||||
def _mostAuthored(self, channel, limit):
|
def _mostAuthored(self, channel, limit):
|
||||||
results = self.db.mostAuthored(channel, limit)
|
results = self.db.mostAuthored(channel, limit)
|
||||||
L = ['%s (%s)' % (ircdb.users.getUser(t[0]).name, int(t[1]))
|
L = ['%s (%s)' % (ircdb.users.getUser(t[0]).name, int(t[1]))
|
||||||
|
Loading…
Reference in New Issue
Block a user