mirror of
https://github.com/jlu5/PyLink.git
synced 2025-05-05 22:27:24 +02: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,
|
irc.call_hooks([my_uid, 'ANTISPAM_KICK', {'channel': channel, 'text': reason, 'target': target,
|
||||||
'parse_as': 'KICK'}])
|
'parse_as': 'KICK'}])
|
||||||
def _kill():
|
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]
|
userdata = irc.users[target]
|
||||||
irc.kill(my_uid, target, reason)
|
irc.kill(my_uid, target, reason)
|
||||||
irc.call_hooks([my_uid, 'ANTISPAM_KILL', {'target': target, 'text': reason,
|
irc.call_hooks([my_uid, 'ANTISPAM_KILL', {'target': target, 'text': reason,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user