aboutsummaryrefslogtreecommitdiff
path: root/modules/channel_access.py
diff options
context:
space:
mode:
authorGravatar jesopo2019-09-26 12:14:55 +0100
committerGravatar jesopo2019-09-26 12:14:55 +0100
commit2e80b223de84d93716baae2ba0ea1a0ec7070686 (patch)
tree711b48e0877707322f504d73e72220acee62a34d /modules/channel_access.py
parent!echo should have a min_args kwarg (diff)
signature
allow all preprocess.command and check.command failures to have a message
Diffstat (limited to 'modules/channel_access.py')
-rw-r--r--modules/channel_access.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/modules/channel_access.py b/modules/channel_access.py
index a15f983e..100b22e0 100644
--- a/modules/channel_access.py
+++ b/modules/channel_access.py
@@ -18,9 +18,10 @@ class Module(ModuleManager.BaseModule):
if require_access:
if self._has_channel_access(target, event["user"],
require_access):
- return utils.consts.PERMISSION_FORCE_SUCCESS
+ return utils.consts.PERMISSION_FORCE_SUCCESS, None
else:
- return "You do not have permission to do this"
+ return (utils.consts.PERMISSION_ERROR,
+ "You do not have permission to do this")
@utils.hook("preprocess.command")
def preprocess_command(self, event):