From 2e80b223de84d93716baae2ba0ea1a0ec7070686 Mon Sep 17 00:00:00 2001 From: jesopo Date: Thu, 26 Sep 2019 12:14:55 +0100 Subject: allow all preprocess.command and check.command failures to have a message --- modules/channel_access.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'modules/channel_access.py') 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): -- cgit v1.3.1-10-gc9f91