From 1242aed9b3be704bfbc1312f1f93b4277b7c2704 Mon Sep 17 00:00:00 2001 From: Firepup Sixfifty Date: Tue, 7 Nov 2023 20:26:06 -0600 Subject: [PATCH] Handle nick changes --- bot.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bot.py b/bot.py index 66aea92..9603d55 100644 --- a/bot.py +++ b/bot.py @@ -321,6 +321,10 @@ class bot: ) self.msg(f"[QUOTE] {sel}", chan) mm.close() + elif action == "NICK": + name = ircmsg.split("!", 1)[0][1:] + if name == self.nick: + self.nick = ircmsg.split("NICK", 1)[1].split(":", 1)[1].strip() else: if ircmsg.startswith("PING "): self.ping(ircmsg)