mirror of
https://github.com/jlu5/PyLink.git
synced 2024-11-27 13:09:23 +01:00
Move handle_error() to the generic protocol
This commit is contained in:
parent
73a70d6952
commit
12e1a0edff
@ -1359,3 +1359,8 @@ class Protocol():
|
||||
"""
|
||||
prefixsearch = re.search(r'\(([A-Za-z]+)\)(.*)', args)
|
||||
return dict(zip(prefixsearch.group(1), prefixsearch.group(2)))
|
||||
|
||||
def handle_error(self, numeric, command, args):
|
||||
"""Handles ERROR messages - these mean that our uplink has disconnected us!"""
|
||||
self.irc.connected.clear()
|
||||
raise ProtocolError('Received an ERROR, disconnecting!')
|
||||
|
@ -374,11 +374,6 @@ class TS6BaseProtocol(IRCS2SProtocol):
|
||||
self.handle_part(kicked, 'KICK', [channel, args[2]])
|
||||
return {'channel': channel, 'target': kicked, 'text': args[2]}
|
||||
|
||||
def handle_error(self, numeric, command, args):
|
||||
"""Handles ERROR messages - these mean that our uplink has disconnected us!"""
|
||||
self.irc.connected.clear()
|
||||
raise ProtocolError('Received an ERROR, disconnecting!')
|
||||
|
||||
def handle_nick(self, numeric, command, args):
|
||||
"""Handles incoming NICK changes."""
|
||||
# <- :70MAAAAAA NICK GL-devel 1434744242
|
||||
|
Loading…
Reference in New Issue
Block a user