From d6de0d97f329ea43ee94b3c48c5a28ddc0ecddfc Mon Sep 17 00:00:00 2001 From: James Lu Date: Sat, 25 Dec 2021 01:00:42 -0800 Subject: [PATCH] unreal: send kill messages without killpath Closes #671. --- protocols/unreal.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/protocols/unreal.py b/protocols/unreal.py index af160c3..8812748 100644 --- a/protocols/unreal.py +++ b/protocols/unreal.py @@ -381,6 +381,16 @@ class UnrealProtocol(TS6BaseProtocol): self.call_hooks([self.sid, 'CHGNAME', {'target': target, 'newgecos': text}]) + def kill(self, source, target, reason): + """Sends a kill from a PyLink client or server.""" + + if (not self.is_internal_client(source)) and \ + (not self.is_internal_server(source)): + raise LookupError('No such PyLink client/server exists.') + + self._send_with_prefix(source, 'KILL %s :%s' % (target, reason)) + self._remove_client(target) + def knock(self, numeric, target, text): """Sends a KNOCK from a PyLink client.""" # KNOCKs in UnrealIRCd are actually just specially formatted NOTICEs,