mirror of
https://github.com/jlu5/PyLink.git
synced 2024-11-01 01:09:22 +01:00
protocols: remove unnecessary handle_squit overrides
This commit is contained in:
parent
d4260734dc
commit
e9a6328566
@ -147,6 +147,9 @@ class IRCS2SProtocol(IRCCommonProtocol):
|
||||
self.protocol_caps = {'can-spawn-clients', 'has-ts', 'can-host-relay',
|
||||
'can-track-servers'}
|
||||
|
||||
# Alias
|
||||
self.handle_squit = self._squit
|
||||
|
||||
def handle_events(self, data):
|
||||
"""Event handler for RFC1459-like protocols.
|
||||
|
||||
@ -353,10 +356,6 @@ class IRCS2SProtocol(IRCCommonProtocol):
|
||||
self._remove_client(numeric)
|
||||
return {'text': args[0]}
|
||||
|
||||
def handle_squit(self, numeric, command, args):
|
||||
"""Handles incoming SQUITs."""
|
||||
return self._squit(numeric, command, args)
|
||||
|
||||
def handle_time(self, numeric, command, args):
|
||||
"""Handles incoming /TIME requests."""
|
||||
return {'target': args[0]}
|
||||
|
@ -506,15 +506,6 @@ class UnrealProtocol(TS6BaseProtocol):
|
||||
sdesc = args[-1]
|
||||
self.servers[sid] = Server(numeric, sname, desc=sdesc)
|
||||
return {'name': sname, 'sid': sid, 'text': sdesc}
|
||||
|
||||
def handle_squit(self, numeric, command, args):
|
||||
"""Handles the SQUIT command."""
|
||||
# <- SQUIT services.int :Read error
|
||||
# Convert the server name to a SID...
|
||||
args[0] = self._get_SID(args[0])
|
||||
# Then, use the SQUIT handler in TS6BaseProtocol as usual.
|
||||
return super().handle_squit(numeric, 'SQUIT', args)
|
||||
|
||||
def handle_protoctl(self, numeric, command, args):
|
||||
"""Handles protocol negotiation."""
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user