mirror of
https://github.com/jlu5/PyLink.git
synced 2025-01-24 19:24:13 +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:
parent
57f77c676d
commit
c49147f232
@ -87,7 +87,8 @@ def handle_stats(irc, source, command, args):
|
|||||||
try:
|
try:
|
||||||
permissions.check_permissions(irc, source, perms)
|
permissions.check_permissions(irc, source, perms)
|
||||||
except utils.NotAuthorizedError as e:
|
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
|
return
|
||||||
|
|
||||||
log.info('(%s) /STATS %s requested by %s', irc.name, stats_type, irc.get_hostmask(source))
|
log.info('(%s) /STATS %s requested by %s', irc.name, stats_type, irc.get_hostmask(source))
|
||||||
|
Loading…
Reference in New Issue
Block a user