mirror of
https://github.com/jlu5/PyLink.git
synced 2024-11-27 21:19:31 +01:00
Move numeric() into IRCS2SProtocol
This commit is contained in:
parent
56c8b90362
commit
694b5018fc
@ -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)
|
||||
|
@ -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."""
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user