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()}" exitcode = f"bye {botnick.lower()}"
ircmsg = "" ircmsg = ""
np = re.compile( 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( ESCAPE_SEQUENCE_RE = re.compile(
@ -387,7 +387,7 @@ def main():
print(f"[LOG][{server}] lol, no.") print(f"[LOG][{server}] lol, no.")
else: else:
sendmsg("Access Denied", chan) sendmsg("Access Denied", chan)
elif np.search(message): elif np.search(message) and name == "FireBitBot":
x02 = "\x02" x02 = "\x02"
sendmsg( sendmsg(
f"f.sp {message.split(':')[1].split('(')[0].strip(f' {x02}')}", f"f.sp {message.split(':')[1].split('(')[0].strip(f' {x02}')}",