From ab1a946364db13a483a2e8aa4f165c5c323b1ca0 Mon Sep 17 00:00:00 2001 From: James Lu Date: Sun, 21 Jun 2015 15:01:45 -0700 Subject: [PATCH] proto/inspircd: fix ping reply syntax Although InspIRCd doesn't seem to care, the correct PONG syntax is: -> : PONG , and not -> : PONG , which was used prior to this commit. --- protocols/inspircd.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/protocols/inspircd.py b/protocols/inspircd.py index 25ececc..5cb015b 100644 --- a/protocols/inspircd.py +++ b/protocols/inspircd.py @@ -150,10 +150,11 @@ def connect(irc): for chan in irc.serverdata['channels']: joinClient(irc, irc.pseudoclient.uid, chan) -# :7NU PING 7NU 0AL -def handle_ping(irc, servernumeric, command, args): - if args[1] == irc.sid: - _sendFromServer(irc, 'PONG %s' % args[1]) +def handle_ping(irc, source, command, args): + # <- :70M PING 70M 0AL + # -> :0AL PONG 0AL 70M + if isInternalServer(irc, args[1]): + _sendFromServer(irc, args[1], 'PONG %s %s' % (args[1], source)) def handle_privmsg(irc, source, command, args): prefix = irc.conf['bot']['prefix']