From f2b2ac52e725a9e6c86c41fae7245c870cf25030 Mon Sep 17 00:00:00 2001 From: jesopo Date: Tue, 28 Aug 2018 15:14:22 +0100 Subject: [PATCH] Send a PONG event, use the right arg when sending a WHO --- IRCLineHandler.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/IRCLineHandler.py b/IRCLineHandler.py index f67beb58..ee48cb71 100644 --- a/IRCLineHandler.py +++ b/IRCLineHandler.py @@ -61,11 +61,15 @@ def handle(line, prefix, command, args, is_final, _bot, server): bot = _bot handler_function(data) -@handler(description="reply to a ping") +@handler(description="received a ping from the server") def handle_PING(data): nonce = data.args[0] data.server.send_pong(nonce) bot.events.on("received").on("ping").call(nonce=nonce, server=data.server) +@handler(description="received a pong from the server") +def handle_PONG(data): + nonce = data.args[1] + bot.events.on("recevied").on("pong").call(nonce=nonce, server=data.server) @handler(description="the first line sent to a registered client", default_event=True) def handle_001(data): @@ -143,7 +147,7 @@ def handle_353(data): channel.add_mode(mode, nickname) @handler(description="on-join user list has finished", default_event=True) def handle_366(data): - data.server.send_who(data.args[2]) + data.server.send_who(data.args[1]) @handler(description="on user joining channel") def handle_JOIN(data):