mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-27 13:19:24 +01:00
Updated to use the new plugin ordering method.
This commit is contained in:
parent
0cd853ad35
commit
eb9bd70599
@ -87,8 +87,8 @@ conf.registerChannelValue(conf.supybot.plugins.Amazon, 'linkSnarfer',
|
|||||||
|
|
||||||
class Amazon(callbacks.PrivmsgCommandAndRegexp):
|
class Amazon(callbacks.PrivmsgCommandAndRegexp):
|
||||||
threaded = True
|
threaded = True
|
||||||
|
callBefore = ['URL']
|
||||||
regexps = ['amzSnarfer']
|
regexps = ['amzSnarfer']
|
||||||
|
|
||||||
def callCommand(self, name, irc, msg, *L, **kwargs):
|
def callCommand(self, name, irc, msg, *L, **kwargs):
|
||||||
try:
|
try:
|
||||||
super(Amazon, self).callCommand(name, irc, msg, *L, **kwargs)
|
super(Amazon, self).callCommand(name, irc, msg, *L, **kwargs)
|
||||||
|
@ -118,6 +118,7 @@ def registerBugzilla(name, url='', description=''):
|
|||||||
class Bugzilla(callbacks.PrivmsgCommandAndRegexp):
|
class Bugzilla(callbacks.PrivmsgCommandAndRegexp):
|
||||||
"""Show a link to a bug report with a brief description"""
|
"""Show a link to a bug report with a brief description"""
|
||||||
threaded = True
|
threaded = True
|
||||||
|
callBefore = ['URL']
|
||||||
regexps = ['bzSnarfer', 'bugzSnarf']
|
regexps = ['bzSnarfer', 'bugzSnarf']
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
|
@ -138,6 +138,8 @@ class Dunno(callbacks.Privmsg):
|
|||||||
messages with messages kept in a database, able to give more personable
|
messages with messages kept in a database, able to give more personable
|
||||||
responses."""
|
responses."""
|
||||||
priority = 100
|
priority = 100
|
||||||
|
callBefore = ['Misc']
|
||||||
|
callAfter = ['MoobotFactoids']
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
callbacks.Privmsg.__init__(self)
|
callbacks.Privmsg.__init__(self)
|
||||||
self.db = DunnoDB()
|
self.db = DunnoDB()
|
||||||
|
@ -77,6 +77,7 @@ class Ebay(callbacks.PrivmsgCommandAndRegexp):
|
|||||||
get info about an auction.
|
get info about an auction.
|
||||||
"""
|
"""
|
||||||
threaded = True
|
threaded = True
|
||||||
|
callBefore = ['URL']
|
||||||
regexps = ['ebaySnarfer']
|
regexps = ['ebaySnarfer']
|
||||||
|
|
||||||
_reopts = re.I | re.S
|
_reopts = re.I | re.S
|
||||||
|
@ -78,6 +78,7 @@ conf.registerChannelValue(conf.supybot.plugins.Gameknot, 'statSnarfer',
|
|||||||
|
|
||||||
class Gameknot(callbacks.PrivmsgCommandAndRegexp):
|
class Gameknot(callbacks.PrivmsgCommandAndRegexp):
|
||||||
threaded = True
|
threaded = True
|
||||||
|
callBefore = ['URL']
|
||||||
regexps = ['gameknotSnarfer', 'gameknotStatsSnarfer']
|
regexps = ['gameknotSnarfer', 'gameknotStatsSnarfer']
|
||||||
_gkrating = re.compile(r'<font color="#FFFF33">(\d+)</font>')
|
_gkrating = re.compile(r'<font color="#FFFF33">(\d+)</font>')
|
||||||
_gkgames = re.compile(r's:</td><td class=sml>(\d+)</td></tr>')
|
_gkgames = re.compile(r's:</td><td class=sml>(\d+)</td></tr>')
|
||||||
|
@ -74,6 +74,7 @@ conf.registerChannelValue(conf.supybot.plugins.Geekquote, 'geekSnarfer',
|
|||||||
|
|
||||||
class Geekquote(callbacks.PrivmsgCommandAndRegexp):
|
class Geekquote(callbacks.PrivmsgCommandAndRegexp):
|
||||||
threaded = True
|
threaded = True
|
||||||
|
callBefore = ['URL']
|
||||||
regexps = ['geekSnarfer']
|
regexps = ['geekSnarfer']
|
||||||
|
|
||||||
def callCommand(self, method, irc, msg, *L, **kwargs):
|
def callCommand(self, method, irc, msg, *L, **kwargs):
|
||||||
|
@ -192,7 +192,8 @@ totalTime = conf.supybot.plugins.Google.state.time()
|
|||||||
|
|
||||||
class Google(callbacks.PrivmsgCommandAndRegexp):
|
class Google(callbacks.PrivmsgCommandAndRegexp):
|
||||||
threaded = True
|
threaded = True
|
||||||
regexps = sets.Set(['googleSnarfer', 'googleGroups'])
|
callBefore = ['URL']
|
||||||
|
regexps = ['googleSnarfer', 'googleGroups']
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
callbacks.PrivmsgCommandAndRegexp.__init__(self)
|
callbacks.PrivmsgCommandAndRegexp.__init__(self)
|
||||||
self.last24hours = structures.TimeoutQueue(86400)
|
self.last24hours = structures.TimeoutQueue(86400)
|
||||||
@ -390,7 +391,7 @@ class Google(callbacks.PrivmsgCommandAndRegexp):
|
|||||||
if not self.registryValue('groupsSnarfer', msg.args[0]):
|
if not self.registryValue('groupsSnarfer', msg.args[0]):
|
||||||
return
|
return
|
||||||
queries = cgi.parse_qsl(match.group(1))
|
queries = cgi.parse_qsl(match.group(1))
|
||||||
queries = filter(lambda q: q[0] in ['threadm', 'selm'], queries)
|
queries = [q for q in queries if q[0] in ('threadm', 'selm')]
|
||||||
if not queries:
|
if not queries:
|
||||||
return
|
return
|
||||||
queries.append(('hl', 'en'))
|
queries.append(('hl', 'en'))
|
||||||
|
@ -310,7 +310,7 @@ def MoobotDB():
|
|||||||
return SqliteMoobotDB()
|
return SqliteMoobotDB()
|
||||||
|
|
||||||
class MoobotFactoids(callbacks.PrivmsgCommandAndRegexp):
|
class MoobotFactoids(callbacks.PrivmsgCommandAndRegexp):
|
||||||
priority = 98
|
callBefore = ['Dunno']
|
||||||
addressedRegexps = ['changeFactoid', 'augmentFactoid',
|
addressedRegexps = ['changeFactoid', 'augmentFactoid',
|
||||||
'replaceFactoid', 'addFactoid']
|
'replaceFactoid', 'addFactoid']
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
|
@ -85,8 +85,9 @@ conf.registerChannelValue(conf.supybot.plugins.Python, 'aspnSnarfer',
|
|||||||
the recipe when it see an ASPN Python recipe link on the channel."""))
|
the recipe when it see an ASPN Python recipe link on the channel."""))
|
||||||
|
|
||||||
class Python(callbacks.PrivmsgCommandAndRegexp):
|
class Python(callbacks.PrivmsgCommandAndRegexp):
|
||||||
modulechars = '%s%s%s' % (string.ascii_letters, string.digits, '_.')
|
callBefore = ['URL']
|
||||||
regexps = ['aspnRecipes']
|
regexps = ['aspnRecipes']
|
||||||
|
modulechars = string.ascii_letters + string.digits + '_.'
|
||||||
def pydoc(self, irc, msg, args):
|
def pydoc(self, irc, msg, args):
|
||||||
"""<python function>
|
"""<python function>
|
||||||
|
|
||||||
|
@ -105,6 +105,7 @@ class Sourceforge(callbacks.PrivmsgCommandAndRegexp):
|
|||||||
project's most recent bugs and rfes.
|
project's most recent bugs and rfes.
|
||||||
"""
|
"""
|
||||||
threaded = True
|
threaded = True
|
||||||
|
callBefore = ['URL']
|
||||||
regexps = ['sfSnarfer']
|
regexps = ['sfSnarfer']
|
||||||
|
|
||||||
_reopts = re.I
|
_reopts = re.I
|
||||||
|
Loading…
Reference in New Issue
Block a user