3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-11-01 01:09:22 +01:00

stats: route permission error replies to notice and not privmsg

This prevents "unknown command" flood loops with stats services which poll these on link.
This commit is contained in:
James Lu 2018-03-04 12:11:50 -08:00
parent 57f77c676d
commit c49147f232

View File

@ -87,7 +87,8 @@ def handle_stats(irc, source, command, args):
try:
permissions.check_permissions(irc, source, perms)
except utils.NotAuthorizedError as e:
irc.msg(source, 'Error: %s' % e) # Note, no irc.error() because this is not a command, but a handler
# Note, no irc.error() because this is not a command, but a handler
irc.msg(source, 'Error: %s' % e, notice=True)
return
log.info('(%s) /STATS %s requested by %s', irc.name, stats_type, irc.get_hostmask(source))