3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-12-25 04:02:45 +01:00

hybrid: Handle PONG

This commit is contained in:
Daniel Oaks 2015-12-27 09:28:48 +10:00
parent 7ec4962412
commit 24589b21c1

View File

@ -333,6 +333,11 @@ class HybridProtocol(TS6BaseProtocol):
if utils.isInternalServer(self.irc, destination): if utils.isInternalServer(self.irc, destination):
self._send(destination, 'PONG %s :%s' % (self.irc.servers[destination].name, source)) self._send(destination, 'PONG %s :%s' % (self.irc.servers[destination].name, source))
def handle_pong(self, source, command, args):
"""Handles incoming PONG commands."""
if source == self.irc.uplink and args[1] == self.irc.sid:
self.irc.lastping = time.time()
# empty handlers # empty handlers
# TODO: there's a better way to do this # TODO: there's a better way to do this
def handle_svinfo(self, numeric, command, args): def handle_svinfo(self, numeric, command, args):