Fix bugs & remove some debug stuff

This commit is contained in:
Firepup Sixfifty 2024-04-30 21:19:28 -05:00
parent a1a722e0cd
commit 23dfa854ac
Signed by: Firepup650
GPG key ID: 7C92E2ABBBFAB9BA
3 changed files with 4 additions and 5 deletions

2
bot.py
View file

@ -286,7 +286,7 @@ class bot(bare.bot):
try: try:
action = ircmsg.split(" ", 2)[1].strip() action = ircmsg.split(" ", 2)[1].strip()
except IndexError: except IndexError:
self.log("Failed to detect message type!", "WARN") pass
self.tmpHost = "" self.tmpHost = ""
if action in handlers.handles: if action in handlers.handles:
res, chan = handlers.handles[action](self, ircmsg) res, chan = handlers.handles[action](self, ircmsg)

View file

@ -6,7 +6,7 @@ from typing import Optional, Any
import bare, pylast import bare, pylast
load_dotenv() load_dotenv()
__version__ = "v3.0.8-dev" __version__ = "v3.0.9"
npbase: str = ( npbase: str = (
"\[\x0303last\.fm\x03\] [A-Za-z0-9_[\]{}\\|\-^]{1,$MAX} (is listening|last listened) to: \x02.+ - .*\x02( \([0-9]+ plays\)( \[.*\])?)?" # pyright: ignore [reportInvalidStringEscapeSequence] "\[\x0303last\.fm\x03\] [A-Za-z0-9_[\]{}\\|\-^]{1,$MAX} (is listening|last listened) to: \x02.+ - .*\x02( \([0-9]+ plays\)( \[.*\])?)?" # pyright: ignore [reportInvalidStringEscapeSequence]
) )

View file

@ -174,9 +174,8 @@ def PART(bot: bare.bot, msg: str) -> tuple[None, None]:
def QUIT(bot: bare.bot, msg: str) -> tuple[None, None]: def QUIT(bot: bare.bot, msg: str) -> tuple[None, None]:
if bot.server == "replirc": if bot.server == "replirc":
quitter = msg.split(" ", 2)[0][1:].strip() quitter = msg.split("!", 1)[0][1:]
bot.log("Someone quit - " + quitter) if quitter == "FireMCbot":
if quitter == "FireMCBot":
bot.send("TOPIC #firemc :FireMC Relay channel (offline)\n") bot.send("TOPIC #firemc :FireMC Relay channel (offline)\n")
return None, None return None, None