Don't respond to any non playing responses except from FireBitBot

This commit is contained in:
Firepup Sixfifty 2023-10-26 19:21:09 -05:00
parent 2a9e3a7aea
commit 616e149d57

View file

@ -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}')}",