From 53b919429994dba03f3153a87d624e7907e4f1a8 Mon Sep 17 00:00:00 2001 From: Firepup Sixfifty Date: Mon, 6 Nov 2023 16:49:48 -0600 Subject: [PATCH] "CTCP" -> "kind" inside the CTCP function --- bot.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/bot.py b/bot.py index dd39e80..dffc069 100644 --- a/bot.py +++ b/bot.py @@ -135,32 +135,32 @@ class bot: if isRaw: sender = msg.split("!", 1)[0][1:] message = msg.split("PRIVMSG", 1)[1].split(":", 1)[1].strip() - CTCP = msg.split("\x01")[1].split(" ", 1)[0] - self.log(f"Responding to CTCP {CTCP} from {sender}") - if CTCP == "VERSION": + kind = msg.split("\x01")[1].split(" ", 1)[0] + self.log(f"Responding to CTCP {kind} from {sender}") + if kind == "VERSION": self.notice( f"\x01VERSION FireBot {__version__} (https://git.amcforum.wiki/Firepup650/fire-ircbot)\x01", sender, True, ) return True - elif CTCP == "USERINFO": + elif kind == "USERINFO": self.notice("\x01USERINFO FireBot (Firepup's bot)\x01", sender, True) return True - elif CTCP == "SOURCE": + elif kind == "SOURCE": self.notice( "\x01SOURCE https://git.amcforum.wiki/Firepup650/fire-ircbot\x01", sender, True, ) return True - elif CTCP == "FINGER": + elif kind == "FINGER": self.notice("\x01FINGER Firepup's bot\x01", sender, True) return True - elif CTCP == "CLIENTINFO": + elif kind == "CLIENTINFO": self.notice( "\x01CLIENTINFO ACTION VERSION USERINFO SOURCE FINGER\x01", sender, True ) return True - self.log(f"Unknown CTCP {CTCP}") + self.log(f"Unknown CTCP {kind}") return False