diff --git a/utils.py b/utils.py index ecb1e91..4e408e8 100644 --- a/utils.py +++ b/utils.py @@ -279,7 +279,11 @@ class ServiceBot(): for func in self.commands[cmd]: try: func(irc, source, cmd_args) - except (NotAuthorizedError, InvalidArgumentsError) as e: + except NotAuthorizedError as e: + self.reply(irc, 'Error: %s' % e) + log.warning('(%s) Denying access to command %r for %s; msg: %s', irc.name, cmd, + irc.get_hostmask(source), e) + except InvalidArgumentsError as e: self.reply(irc, 'Error: %s' % e) except Exception as e: log.exception('Unhandled exception caught in command %r', cmd)