Handle nick changes

This commit is contained in:
Firepup Sixfifty 2023-11-07 20:26:06 -06:00
parent 5ae91f4b26
commit 1242aed9b3
Signed by: Firepup650
GPG key ID: 7C92E2ABBBFAB9BA

4
bot.py
View file

@ -321,6 +321,10 @@ class bot:
) )
self.msg(f"[QUOTE] {sel}", chan) self.msg(f"[QUOTE] {sel}", chan)
mm.close() 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: else:
if ircmsg.startswith("PING "): if ircmsg.startswith("PING "):
self.ping(ircmsg) self.ping(ircmsg)