mirror of
https://github.com/jlu5/PyLink.git
synced 2025-01-23 18:54:05 +01:00
servprotect: only track kills and saves to PyLink clients
why wasn't this done before...
This commit is contained in:
parent
ead20f5be9
commit
76ecc60675
@ -17,6 +17,8 @@ def handle_kill(irc, numeric, command, args):
|
||||
Tracks kills against PyLink clients. If too many are received,
|
||||
automatically disconnects from the network.
|
||||
"""
|
||||
|
||||
if (args['userdata'] and irc.isInternalServer(args['userdata'].server)) or irc.isInternalClient(args['target']):
|
||||
if killcache.setdefault(irc.name, 1) >= length:
|
||||
log.error('(%s) servprotect: Too many kills received, aborting!', irc.name)
|
||||
irc.disconnect()
|
||||
@ -31,6 +33,7 @@ def handle_save(irc, numeric, command, args):
|
||||
Tracks SAVEs (nick collision) against PyLink clients. If too many are received,
|
||||
automatically disconnects from the network.
|
||||
"""
|
||||
if irc.isInternalClient(args['target']):
|
||||
if savecache.setdefault(irc.name, 0) >= length:
|
||||
log.error('(%s) servprotect: Too many nick collisions, aborting!', irc.name)
|
||||
irc.disconnect()
|
||||
|
Loading…
Reference in New Issue
Block a user