preprocess.command returns now need action, message
returns
This commit is contained in:
parent
432fd39441
commit
843440ac97
1 changed files with 3 additions and 3 deletions
|
@ -34,13 +34,13 @@ class Module(ModuleManager.BaseModule):
|
||||||
@utils.hook("preprocess.command")
|
@utils.hook("preprocess.command")
|
||||||
def preprocess_command(self, event):
|
def preprocess_command(self, event):
|
||||||
if self._user_ignored(event["user"]):
|
if self._user_ignored(event["user"]):
|
||||||
return utils.consts.PERMISSION_HARD_FAIL
|
return utils.consts.PERMISSION_HARD_FAIL, None
|
||||||
elif event["is_channel"] and self._user_channel_ignored(event["target"],
|
elif event["is_channel"] and self._user_channel_ignored(event["target"],
|
||||||
event["user"]):
|
event["user"]):
|
||||||
return utils.consts.PERMISSION_HARD_FAIL
|
return utils.consts.PERMISSION_HARD_FAIL, None
|
||||||
elif self._is_command_ignored(event["server"], event["user"],
|
elif self._is_command_ignored(event["server"], event["user"],
|
||||||
event["command"]):
|
event["command"]):
|
||||||
return utils.consts.PERMISSION_HARD_FAIL
|
return utils.consts.PERMISSION_HARD_FAIL, None
|
||||||
|
|
||||||
@utils.hook("received.command.ignore", min_args=1)
|
@utils.hook("received.command.ignore", min_args=1)
|
||||||
def ignore(self, event):
|
def ignore(self, event):
|
||||||
|
|
Loading…
Reference in a new issue