From 616e149d576c0243a1e7f0a7961d8c18a3bcd827 Mon Sep 17 00:00:00 2001 From: Firepup Sixfifty Date: Thu, 26 Oct 2023 19:21:09 -0500 Subject: [PATCH] Don't respond to any non playing responses except from FireBitBot --- ircbot.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ircbot.py b/ircbot.py index 520ba40..64771c2 100644 --- a/ircbot.py +++ b/ircbot.py @@ -58,7 +58,7 @@ adminnames = servers[server]["admins"] exitcode = f"bye {botnick.lower()}" ircmsg = "" np = re.compile( - "\[\x0303last\.fm\x03\] [A-Za-z0-9_]+ is listening to: \x02.+ - .+\x02 \([0-9]+ plays\)" + "\[\x0303last\.fm\x03\] [A-Za-z0-9_]+ (is listening|last listened) to: \x02.+ - .+\x02 \([0-9]+ plays\)" ) ESCAPE_SEQUENCE_RE = re.compile( @@ -387,7 +387,7 @@ def main(): print(f"[LOG][{server}] lol, no.") else: sendmsg("Access Denied", chan) - elif np.search(message): + elif np.search(message) and name == "FireBitBot": x02 = "\x02" sendmsg( f"f.sp {message.split(':')[1].split('(')[0].strip(f' {x02}')}",