3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-11-24 03:29:28 +01:00

nefarious: relay KILL user data properly

This commit is contained in:
James Lu 2016-04-18 10:51:48 -07:00
parent 4b4db64705
commit 81d2450460

View File

@ -1091,9 +1091,13 @@ class P10Protocol(Protocol):
"""Handles incoming KILLs.""" """Handles incoming KILLs."""
# <- ABAAA D AyAAA :nefarious.midnight.vpn!GL (test) # <- ABAAA D AyAAA :nefarious.midnight.vpn!GL (test)
killed = args[0] killed = args[0]
if killed in self.irc.users:
# Back up the target user data before removing it, so we can send it via a hook.
data = self.irc.users.get(killed)
if data:
self.removeClient(killed) self.removeClient(killed)
return {'target': killed, 'text': args[1], 'userdata': self.irc.users.get(killed)} return {'target': killed, 'text': args[1], 'userdata': data}
def handle_squit(self, numeric, command, args): def handle_squit(self, numeric, command, args):
"""Handles incoming SQUITs.""" """Handles incoming SQUITs."""