3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-12-28 13:42:37 +01:00

inspircd: rewrite handle_ping to handle one-arg PING

This commit is contained in:
James Lu 2017-08-09 16:55:02 -07:00
parent 5381e85d3c
commit 614b8b87da

View File

@ -522,8 +522,10 @@ class InspIRCdProtocol(TS6BaseProtocol):
"""Handles incoming PING commands, so we don't time out."""
# <- :70M PING 70M 0AL
# -> :0AL PONG 0AL 70M
if self.is_internal_server(args[1]):
if len(args) >= 2:
self._send_with_prefix(args[1], 'PONG %s %s' % (args[1], source), queue=False)
else:
self._send_with_prefix(self.sid, 'PONG %s' % source, queue=False)
def handle_fjoin(self, servernumeric, command, args):
"""Handles incoming FJOIN commands (InspIRCd equivalent of JOIN/SJOIN)."""