mirror of
https://github.com/jlu5/PyLink.git
synced 2024-11-23 19:19:31 +01:00
antispam: read nicks from userdata when handling QUITs (#617)
get_hostmask() doesn't work on someone who has already quit.
This commit is contained in:
parent
e3e0eac747
commit
4bd334e2b8
@ -402,7 +402,7 @@ def handle_partquit(irc, source, command, args):
|
|||||||
else:
|
else:
|
||||||
filtered_message = pq_settings.get('quit_filter_message', PARTQUIT_DEFAULTS['quit_filter_message'])
|
filtered_message = pq_settings.get('quit_filter_message', PARTQUIT_DEFAULTS['quit_filter_message'])
|
||||||
log.info('(%s) antispam: filtered quit message from %s due to part/quit filter glob %s',
|
log.info('(%s) antispam: filtered quit message from %s due to part/quit filter glob %s',
|
||||||
irc.name, irc.get_hostmask(source), filterglob)
|
irc.name, args['userdata'].nick, filterglob)
|
||||||
args['text'] = filtered_message
|
args['text'] = filtered_message
|
||||||
break
|
break
|
||||||
utils.add_hook(handle_partquit, 'PART', priority=999)
|
utils.add_hook(handle_partquit, 'PART', priority=999)
|
||||||
|
Loading…
Reference in New Issue
Block a user