Merge "Handle exception for unprivileged commands"

This commit is contained in:
Zuul 2022-09-28 14:15:37 +00:00 committed by Gerrit Code Review
commit 387e31a16c
1 changed files with 9 additions and 5 deletions

View File

@ -386,11 +386,15 @@ class BaseStatusBot(SSL, irc.bot.SingleServerIRCBot):
nick = e.source.split('!')[0]
msg = e.arguments[0]
# Unprivileged commands
if msg.startswith('#success'):
self.handle_success_command(e.target, nick, msg)
return
if msg.startswith('#thanks'):
self.handle_thanks_command(e.target, nick, msg)
try:
if msg.startswith('#success'):
self.handle_success_command(e.target, nick, msg)
return
if msg.startswith('#thanks'):
self.handle_thanks_command(e.target, nick, msg)
return
except Exception:
self.log.exception("Exception handling command %s" % msg)
return
# Privileged commands
if not msg.startswith('#status'):