mirror of
https://github.com/jlu5/PyLink.git
synced 2024-12-25 04:02:45 +01:00
Move handle_sid to ts6_common
This commit is contained in:
parent
614b8b87da
commit
d0f9a2465d
@ -564,15 +564,6 @@ class TS6Protocol(TS6BaseProtocol):
|
||||
|
||||
return self.handle_euid(numeric, command, euid_args)
|
||||
|
||||
def handle_sid(self, numeric, command, args):
|
||||
"""Handles incoming server introductions."""
|
||||
# parameters: server name, hopcount, sid, server description
|
||||
servername = args[0].lower()
|
||||
sid = args[2]
|
||||
sdesc = args[-1]
|
||||
self.servers[sid] = Server(numeric, servername, desc=sdesc)
|
||||
return {'name': servername, 'sid': sid, 'text': sdesc}
|
||||
|
||||
def handle_server(self, numeric, command, args):
|
||||
"""
|
||||
Handles 1) incoming legacy (no SID) server introductions,
|
||||
|
@ -227,6 +227,16 @@ class TS6BaseProtocol(IRCS2SProtocol):
|
||||
|
||||
return {'target': user, 'ts': 100, 'oldnick': oldnick}
|
||||
|
||||
def handle_sid(self, numeric, command, args):
|
||||
"""Handles the SID command, used for introducing remote servers by our uplink."""
|
||||
# <- SID services.int 2 00A :Shaltúre IRC Services
|
||||
# parameters: server name, hopcount, sid, server description
|
||||
sname = args[0].lower()
|
||||
sid = args[2]
|
||||
sdesc = args[-1]
|
||||
self.servers[sid] = Server(numeric, sname, desc=sdesc)
|
||||
return {'name': sname, 'sid': sid, 'text': sdesc}
|
||||
|
||||
def handle_svsnick(self, source, command, args):
|
||||
"""Handles SVSNICK (forced nickname change attempts)."""
|
||||
# InspIRCd:
|
||||
|
@ -491,14 +491,6 @@ class UnrealProtocol(TS6BaseProtocol):
|
||||
self.servers[servername] = Server(numeric, servername, desc=sdesc)
|
||||
return {'name': servername, 'sid': None, 'text': sdesc}
|
||||
|
||||
def handle_sid(self, numeric, command, args):
|
||||
"""Handles the SID command, used for introducing remote servers by our uplink."""
|
||||
# <- SID services.int 2 00A :Shaltúre IRC Services
|
||||
sname = args[0].lower()
|
||||
sid = args[2]
|
||||
sdesc = args[-1]
|
||||
self.servers[sid] = Server(numeric, sname, desc=sdesc)
|
||||
return {'name': sname, 'sid': sid, 'text': sdesc}
|
||||
def handle_protoctl(self, numeric, command, args):
|
||||
"""Handles protocol negotiation."""
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user