Support 'channel-access' check request referencing current channel
This commit is contained in:
parent
98e1202c78
commit
73aa55b866
1 changed files with 7 additions and 2 deletions
|
@ -30,8 +30,13 @@ class Module(ModuleManager.BaseModule):
|
||||||
|
|
||||||
@utils.hook("check.command.channel-access")
|
@utils.hook("check.command.channel-access")
|
||||||
def check_command(self, event):
|
def check_command(self, event):
|
||||||
return self._command_check(event, event["check_args"][0],
|
target = event["target"]
|
||||||
event["check_args"][1])
|
access = event["request_args"][0]
|
||||||
|
if len(event["request_args"]) > 1:
|
||||||
|
target = event["request_args"][0]
|
||||||
|
access = event["request_args"][1]
|
||||||
|
|
||||||
|
return self._command_check(event, target, access)
|
||||||
|
|
||||||
@utils.hook("received.command.access", min_args=1, channel_only=True)
|
@utils.hook("received.command.access", min_args=1, channel_only=True)
|
||||||
def access(self, event):
|
def access(self, event):
|
||||||
|
|
Loading…
Reference in a new issue