From 694b5018fc0a95941d6d28c61d934a280b45fdd3 Mon Sep 17 00:00:00 2001 From: James Lu Date: Wed, 5 Jul 2017 02:36:34 -0700 Subject: [PATCH] Move numeric() into IRCS2SProtocol --- protocols/ircs2s_common.py | 7 +++++++ protocols/ts6_common.py | 8 -------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/protocols/ircs2s_common.py b/protocols/ircs2s_common.py index b36e878..eb2e9b9 100644 --- a/protocols/ircs2s_common.py +++ b/protocols/ircs2s_common.py @@ -373,6 +373,13 @@ class IRCS2SProtocol(IRCCommonProtocol): # handle_part() does that just fine. self.handle_part(target, 'KICK', [channel]) + def numeric(self, source, numeric, target, text): + """Sends raw numerics from a server to a remote client. This is used for WHOIS replies.""" + # Mangle the target for IRCds that require it. + target = self._expandPUID(target) + + self._send_with_prefix(source, '%s %s %s' % (numeric, target, text)) + def part(self, client, channel, reason=None): """Sends a part from a PyLink client.""" channel = self.to_lower(channel) diff --git a/protocols/ts6_common.py b/protocols/ts6_common.py index 590bbd9..4a34d6f 100644 --- a/protocols/ts6_common.py +++ b/protocols/ts6_common.py @@ -110,14 +110,6 @@ class TS6BaseProtocol(IRCS2SProtocol): ### OUTGOING COMMANDS - def numeric(self, source, numeric, target, text): - """Sends raw numerics from a server to a remote client, used for WHOIS - replies.""" - # Mangle the target for IRCds that require it. - target = self._expandPUID(target) - - self._send_with_prefix(source, '%s %s %s' % (numeric, target, text)) - def kill(self, numeric, target, reason): """Sends a kill from a PyLink client/server."""