mirror of
https://github.com/jlu5/PyLink.git
synced 2024-11-27 21:19:31 +01:00
nefarious: relay KILL user data properly
This commit is contained in:
parent
4b4db64705
commit
81d2450460
@ -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."""
|
||||||
|
Loading…
Reference in New Issue
Block a user