From 1555ea16c0c59074be618c6a2355635bde7f1237 Mon Sep 17 00:00:00 2001 From: Firepup Sixfifty Date: Mon, 23 Oct 2023 17:50:21 -0500 Subject: [PATCH] Fix edge-cases with "PING" --- ircbot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ircbot.py b/ircbot.py index bac12ab..6b35b45 100644 --- a/ircbot.py +++ b/ircbot.py @@ -108,7 +108,7 @@ def joinserver(): if ircmsg.find("PING :") != -1: # pong = "PONG :" + input("Ping?:") + "\n" # pong = pong.replace("\\\\", "\\") - pong = f"PONG :{ircmsg.split(':')[1]}\n" + pong = f"PONG :{ircmsg.split('PING :')[1]}\n" print(pong, end="") ircsock.send(bytes(pong, e)) if ircmsg.find("Closing Link") != -1: