diff --git a/errbot/__init__.py b/errbot/__init__.py index ce6f5cb23..1d1a407cb 100644 --- a/errbot/__init__.py +++ b/errbot/__init__.py @@ -566,7 +566,7 @@ def some_filter(self, msg, cmd, args, dry_run): command is authorized or not. \"\"\" # If wishing to block the incoming command: - return None, None, None + return None, cmd, args # Otherwise pass data through to the (potential) next filter: return msg, cmd, args diff --git a/errbot/core.py b/errbot/core.py index 390e2ef7b..6c8ffe30e 100644 --- a/errbot/core.py +++ b/errbot/core.py @@ -426,7 +426,7 @@ def _process_command_filters( for cmd_filter in self.command_filters: msg, cmd, args = cmd_filter(msg, cmd, args, dry_run) if msg is None: - return None, None, None + return None, cmd, args return msg, cmd, args except Exception: log.exception( @@ -440,7 +440,7 @@ def _process_command(self, msg, cmd, args, match): # first it must go through the command filters msg, cmd, args = self._process_command_filters(msg, cmd, args, False) if msg is None: - log.info("Command %s blocked or deferred.", cmd) + log.info("Command \"%s\" blocked or deferred.", cmd) return frm = msg.frm