mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-24 11:42:52 +01:00
callbacks.py: Pass a reference to the plugin to pre-command callbacks.
This commit is contained in:
parent
6c9b03f70c
commit
aea77d64e7
@ -1239,7 +1239,7 @@ class Commands(BasePlugin):
|
|||||||
|
|
||||||
def callCommand(self, command, irc, msg, *args, **kwargs):
|
def callCommand(self, command, irc, msg, *args, **kwargs):
|
||||||
# We run all callbacks before checking if one of them returned True
|
# We run all callbacks before checking if one of them returned True
|
||||||
if any(bool, list(cb(command, irc, msg, *args, **kwargs)
|
if any(bool, list(cb(self, command, irc, msg, *args, **kwargs)
|
||||||
for cb in self.pre_command_callbacks)):
|
for cb in self.pre_command_callbacks)):
|
||||||
return
|
return
|
||||||
method = self.getCommandMethod(command)
|
method = self.getCommandMethod(command)
|
||||||
|
Loading…
Reference in New Issue
Block a user