3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-11-01 01:09:22 +01:00

relay: format KILL sources when relaying local kills

Kill reason formatting was changed in #520.
This commit is contained in:
James Lu 2019-07-01 14:14:53 -07:00
parent bcdd26926d
commit edd27eea41

View File

@ -2076,13 +2076,9 @@ def handle_kill(irc, numeric, command, args):
irc.sjoin(irc.sid, localchan, [(modes, client)])
# Target user was local.
else:
# Note: some IRCds (charybdis) don't send explicit QUIT messages
# for locally killed clients, while others (inspircd) do
# If we receive a user object in 'userdata' instead of None, it means
# that the KILL hasn't been handled by a preceding QUIT message.
if userdata:
handle_quit(irc, target, 'KILL', {'text': args['text']})
elif userdata:
reason = 'Killed (%s (%s))' % (irc.get_friendly_name(numeric), args['text'])
handle_quit(irc, target, 'KILL', {'text': reason})
utils.add_hook(handle_kill, 'KILL')