mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-19 08:59:27 +01:00
Made isCommand checking more flexible.
This commit is contained in:
parent
8ab1e9834a
commit
56a204b453
@ -295,6 +295,7 @@ class Privmsg(irclib.IrcCallback):
|
||||
"""Base class for all Privmsg handlers."""
|
||||
threaded = False
|
||||
public = True
|
||||
commandArgs = ['self', 'irc', 'msg', 'args']
|
||||
def __init__(self):
|
||||
self.rateLimiter = RateLimiter()
|
||||
if self.threaded:
|
||||
@ -317,8 +318,7 @@ class Privmsg(irclib.IrcCallback):
|
||||
method = getattr(self, methodName)
|
||||
if inspect.ismethod(method):
|
||||
code = method.im_func.func_code
|
||||
return inspect.getargs(code) == (['self','irc', 'msg', 'args'],
|
||||
None, None)
|
||||
return inspect.getargs(code) == (self.commandArgs, None, None)
|
||||
else:
|
||||
return False
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user