From 69d601042ef183c2bb2aaa34a34f4c9fbe584890 Mon Sep 17 00:00:00 2001 From: Firepup Sixfifty Date: Sat, 4 Nov 2023 21:34:59 -0500 Subject: [PATCH] Bandaid --- ircbot.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ircbot.py b/ircbot.py index 4c4600e..ce5470a 100644 --- a/ircbot.py +++ b/ircbot.py @@ -274,6 +274,11 @@ def main(): else: print(raw.lazy_decode(), sep="\n") if ircmsg.find("PRIVMSG") != -1: + try: + ircmsg.split("PRIVMSG", 1)[1] + except IndexError: + log("Fake message recieved", server, "WARN") + continue # Format of ":[Nick]![ident]@[host|vhost] PRIVMSG [channel] :[message]” name = ircmsg.split("!", 1)[0][1:] helpErr = False