diff --git a/modules/commands.py b/modules/commands.py index 1b952fff..c2aae451 100644 --- a/modules/commands.py +++ b/modules/commands.py @@ -173,23 +173,21 @@ class Module(ModuleManager.BaseModule): hook=hook, user=event["user"], server=event["server"], target=target, is_channel=is_channel, tags=event["tags"]) - error = None + hard_fail = False force_success = False + error = None for returned in returns: if returned == utils.consts.PERMISSION_HARD_FAIL: - # denotes a "silent failure" - target.buffer.skip_next() - return + hard_fail = True elif returned == utils.consts.PERMISSION_FORCE_SUCCESS: force_success = True - break elif returned: - # error message error = returned - if error and not force_success: - stderr.write(error).send(command_method) - target.buffer.skip_next() - return + + if hard_fail or (not force_success and error): + if error: + stderr.write(error).send(command_method) + target.buffer.skip_next() if hook.kwargs.get("remove_empty", True): args_split = list(filter(None, args_split)) diff --git a/modules/github/module.py b/modules/github/module.py index 55abe233..6e413617 100644 --- a/modules/github/module.py +++ b/modules/github/module.py @@ -157,6 +157,7 @@ class Module(ModuleManager.BaseModule): """ :help: Add/remove/modify a github webhook :require_mode: high + :permission: githuboverride :usage: list :usage: add :usage: remove