diff --git a/protocols/ts6.py b/protocols/ts6.py index 98c5402..d85de69 100644 --- a/protocols/ts6.py +++ b/protocols/ts6.py @@ -584,10 +584,7 @@ class TS6Protocol(TS6BaseProtocol): return # <- :services.int SERVER a.bc 2 :(H) [GL] a - servername = args[0].lower() - sdesc = args[-1] - self.servers[servername] = Server(numeric, servername, desc=sdesc) - return {'name': servername, 'sid': None, 'text': sdesc} + return super().handle_server(numeric, command, args) def handle_tmode(self, numeric, command, args): """Handles incoming TMODE commands (channel mode change).""" diff --git a/protocols/ts6_common.py b/protocols/ts6_common.py index 64d69c7..b113301 100644 --- a/protocols/ts6_common.py +++ b/protocols/ts6_common.py @@ -227,6 +227,14 @@ class TS6BaseProtocol(IRCS2SProtocol): return {'target': user, 'ts': 100, 'oldnick': oldnick} + def handle_server(self, numeric, command, args): + """Handles the SERVER command, used for introducing older (TS5) servers.""" + # <- :services.int SERVER a.bc 2 :(H) [GL] test jupe + servername = args[0].lower() + sdesc = args[-1] + 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 diff --git a/protocols/unreal.py b/protocols/unreal.py index 94a56e1..0302175 100644 --- a/protocols/unreal.py +++ b/protocols/unreal.py @@ -486,10 +486,7 @@ class UnrealProtocol(TS6BaseProtocol): else: # Legacy (non-SID) servers can still be introduced using the SERVER command. # <- :services.int SERVER a.bc 2 :(H) [GL] a - servername = args[0].lower() - sdesc = args[-1] - self.servers[servername] = Server(numeric, servername, desc=sdesc) - return {'name': servername, 'sid': None, 'text': sdesc} + return super().handle_server(numeric, command, args) def handle_protoctl(self, numeric, command, args): """Handles protocol negotiation."""