mirror of
https://github.com/jlu5/PyLink.git
synced 2025-01-24 11:14:07 +01:00
antispam: don't kill users if they quit after previous punishments
This commit is contained in:
parent
dd8f9411b6
commit
3e07239db4
@ -54,6 +54,10 @@ def _punish(irc, target, channel, reason):
|
||||
irc.call_hooks([my_uid, 'ANTISPAM_KICK', {'channel': channel, 'text': reason, 'target': target,
|
||||
'parse_as': 'KICK'}])
|
||||
def _kill():
|
||||
if target not in irc.users:
|
||||
log.debug('(%s) antispam: not killing %s/%s; they already left', irc.name, target,
|
||||
irc.get_friendly_name(target))
|
||||
return
|
||||
userdata = irc.users[target]
|
||||
irc.kill(my_uid, target, reason)
|
||||
irc.call_hooks([my_uid, 'ANTISPAM_KILL', {'target': target, 'text': reason,
|
||||
|
Loading…
Reference in New Issue
Block a user