3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-12-25 20:22:45 +01:00

ServiceBot: log access denials to warning - closes #593

This commit is contained in:
James Lu 2018-04-07 20:21:41 -07:00
parent f75b1eb356
commit 655221491c

View File

@ -279,7 +279,11 @@ class ServiceBot():
for func in self.commands[cmd]: for func in self.commands[cmd]:
try: try:
func(irc, source, cmd_args) 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) self.reply(irc, 'Error: %s' % e)
except Exception as e: except Exception as e:
log.exception('Unhandled exception caught in command %r', cmd) log.exception('Unhandled exception caught in command %r', cmd)