From 23dfa854acbde50cef0fa0e30b9d7fa52ec9fddf Mon Sep 17 00:00:00 2001 From: Firepup Sixfifty Date: Tue, 30 Apr 2024 21:19:28 -0500 Subject: [PATCH] Fix bugs & remove some debug stuff --- bot.py | 2 +- config.py | 2 +- handlers.py | 5 ++--- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/bot.py b/bot.py index 14cb8db..62bb7c8 100644 --- a/bot.py +++ b/bot.py @@ -286,7 +286,7 @@ class bot(bare.bot): try: action = ircmsg.split(" ", 2)[1].strip() except IndexError: - self.log("Failed to detect message type!", "WARN") + pass self.tmpHost = "" if action in handlers.handles: res, chan = handlers.handles[action](self, ircmsg) diff --git a/config.py b/config.py index fd65715..2613740 100644 --- a/config.py +++ b/config.py @@ -6,7 +6,7 @@ from typing import Optional, Any import bare, pylast load_dotenv() -__version__ = "v3.0.8-dev" +__version__ = "v3.0.9" npbase: str = ( "\[\x0303last\.fm\x03\] [A-Za-z0-9_[\]{}\\|\-^]{1,$MAX} (is listening|last listened) to: \x02.+ - .*\x02( \([0-9]+ plays\)( \[.*\])?)?" # pyright: ignore [reportInvalidStringEscapeSequence] ) diff --git a/handlers.py b/handlers.py index 4a3e513..d5d8bd3 100644 --- a/handlers.py +++ b/handlers.py @@ -174,9 +174,8 @@ def PART(bot: bare.bot, msg: str) -> tuple[None, None]: def QUIT(bot: bare.bot, msg: str) -> tuple[None, None]: if bot.server == "replirc": - quitter = msg.split(" ", 2)[0][1:].strip() - bot.log("Someone quit - " + quitter) - if quitter == "FireMCBot": + quitter = msg.split("!", 1)[0][1:] + if quitter == "FireMCbot": bot.send("TOPIC #firemc :FireMC Relay channel (offline)\n") return None, None