mirror of
https://github.com/jlu5/PyLink.git
synced 2025-02-02 23:54:08 +01:00
protocols: move handle_pong to IRCCommonProtocol
This commit is contained in:
parent
2e5fc2467f
commit
276b0b251d
@ -891,13 +891,6 @@ class ClientbotWrapperProtocol(IRCCommonProtocol):
|
||||
"""
|
||||
self.send('PONG :%s' % args[0], queue=False)
|
||||
|
||||
def handle_pong(self, source, command, args):
|
||||
"""
|
||||
Handles incoming PONG.
|
||||
"""
|
||||
if source == self.uplink:
|
||||
self.lastping = time.time()
|
||||
|
||||
def handle_privmsg(self, source, command, args):
|
||||
"""Handles incoming PRIVMSG/NOTICE."""
|
||||
# <- :sender PRIVMSG #dev :afasfsa
|
||||
|
@ -175,6 +175,11 @@ class IRCCommonProtocol(IRCNetwork):
|
||||
"""Handles ERROR messages - these mean that our uplink has disconnected us!"""
|
||||
raise ProtocolError('Received an ERROR, disconnecting!')
|
||||
|
||||
def handle_pong(self, source, command, args):
|
||||
"""Handles incoming PONG commands."""
|
||||
if source == self.uplink:
|
||||
self.lastping = time.time()
|
||||
|
||||
def handle_005(self, source, command, args):
|
||||
"""
|
||||
Handles 005 / RPL_ISUPPORT. This is used by at least Clientbot and ngIRCd (for server negotiation).
|
||||
@ -490,11 +495,6 @@ class IRCS2SProtocol(IRCCommonProtocol):
|
||||
|
||||
return {'channels': channels, 'text': reason}
|
||||
|
||||
def handle_pong(self, source, command, args):
|
||||
"""Handles incoming PONG commands."""
|
||||
if source == self.uplink:
|
||||
self.lastping = time.time()
|
||||
|
||||
def handle_privmsg(self, source, command, args):
|
||||
"""Handles incoming PRIVMSG/NOTICE."""
|
||||
# TS6:
|
||||
|
Loading…
Reference in New Issue
Block a user