diff --git a/bot.py b/bot.py index 62bb7c8..14cb8db 100644 --- a/bot.py +++ b/bot.py @@ -286,7 +286,7 @@ class bot(bare.bot): try: action = ircmsg.split(" ", 2)[1].strip() except IndexError: - pass + self.log("Failed to detect message type!", "WARN") self.tmpHost = "" if action in handlers.handles: res, chan = handlers.handles[action](self, ircmsg) diff --git a/config.py b/config.py index eb9c8b7..fd65715 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" +__version__ = "v3.0.8-dev" 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 ba7e32b..a419f18 100644 --- a/handlers.py +++ b/handlers.py @@ -174,7 +174,9 @@ def PART(bot: bare.bot, msg: str) -> tuple[None, None]: def QUIT(bot: bare.bot, msg: str) -> tuple[None, None]: if bot.server == "replirc": - if msg.split("!", 1)[0][1:] == "FireMCBot": + quitter = msg.split(" ", 2)[1].strip() + bot.log("Someone quit - " + quitter) + if quitter == "FireMCBot": bot.send("TOPIC #firemc :FireMC Relay channel (offline)\n") return None, None