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

proto/inspircd: fix ping reply syntax

Although InspIRCd doesn't seem to care, the correct PONG syntax is:

-> :<our sid> PONG <our sid> <their sid>,

and not

-> :<our sid> PONG <our sid>,

which was used prior to this commit.
This commit is contained in:
James Lu 2015-06-21 15:01:45 -07:00
parent c686523a6e
commit ab1a946364

View File

@ -150,10 +150,11 @@ def connect(irc):
for chan in irc.serverdata['channels']: for chan in irc.serverdata['channels']:
joinClient(irc, irc.pseudoclient.uid, chan) joinClient(irc, irc.pseudoclient.uid, chan)
# :7NU PING 7NU 0AL def handle_ping(irc, source, command, args):
def handle_ping(irc, servernumeric, command, args): # <- :70M PING 70M 0AL
if args[1] == irc.sid: # -> :0AL PONG 0AL 70M
_sendFromServer(irc, 'PONG %s' % args[1]) if isInternalServer(irc, args[1]):
_sendFromServer(irc, args[1], 'PONG %s %s' % (args[1], source))
def handle_privmsg(irc, source, command, args): def handle_privmsg(irc, source, command, args):
prefix = irc.conf['bot']['prefix'] prefix = irc.conf['bot']['prefix']