Apparently you can not have a play count

This commit is contained in:
Firepup Sixfifty 2023-11-07 06:23:28 -06:00
parent 019e38caec
commit 2a5dc6eeef
Signed by: Firepup650
GPG key ID: 7C92E2ABBBFAB9BA
2 changed files with 2 additions and 24 deletions

View file

@ -1,6 +1,6 @@
#!/usr/bin/python3 #!/usr/bin/python3
__version__ = "v1.0.5" __version__ = "v1.0.5"
npbase = "\[\x0303last\.fm\x03\] [A-Za-z0-9_[\]{}\\|^]{1,MAX} (is listening|last listened) to: \x02.+ - .*\x02 \([0-9]+ plays\)( \[.*\])?" npbase = "\[\x0303last\.fm\x03\] [A-Za-z0-9_[\]{}\\|^]{1,MAX} (is listening|last listened) to: \x02.+ - .*\x02( \([0-9]+ plays\)( \[.*\])?)?"
servers = { servers = {
"ircnow": { "ircnow": {
"address": "localhost", "address": "localhost",

View file

@ -10,33 +10,12 @@ from pythonlangutil.overload import Overload, signature
from datetime import datetime as dt from datetime import datetime as dt
from logs import log from logs import log
from subprocess import run, PIPE from subprocess import run, PIPE
from config import npbase, servers, __version__
load_dotenv() load_dotenv()
__version__ = "v1.0.5"
ircsock = socket(AF_INET, SOCK_STREAM) ircsock = socket(AF_INET, SOCK_STREAM)
botnick = "FireBot" botnick = "FireBot"
servers = {
"ircnow": {
"address": "localhost",
"port": 6601,
"interval": 200,
"pass": env["ircnow_pass"],
"channels": {"#random": 0, "#dice": 0, "#offtopic": 0},
"admins": ["firepup", "h|thelounge", "firepup|lounge"],
},
"efnet": {
"address": "irc.mzima.net",
"channels": {"#random": 0, "#dice": 0},
"admins": ["firepup", "h|tl"],
},
"replirc": {
"address": "localhost",
"pass": env["replirc_pass"],
"channels": {"#random": 0, "#dice": 0, "#main": 0, "#bots": 0, "#firebot": 0},
"admins": ["firepup", "firepup|lounge", "h|tl"],
},
}
server = args[1] if args else "UNSTABLE BOT MODE" server = args[1] if args else "UNSTABLE BOT MODE"
@ -57,7 +36,6 @@ if __name__ == "__main__":
gblrebt = "all" gblrebt = "all"
adminnames = servers[server]["admins"] adminnames = servers[server]["admins"]
exitcode = f"bye {botnick.lower()}" exitcode = f"bye {botnick.lower()}"
npbase = "\[\x0303last\.fm\x03\] [A-Za-z0-9_[\]{}\\|^]{1,MAX} (is listening|last listened) to: \x02.+ - .*\x02 \([0-9]+ plays\)( \[.*\])?"
np = re.compile(npbase.replace("MAX", f"{nicklen}")) np = re.compile(npbase.replace("MAX", f"{nicklen}"))
queue = [] queue = []
log(f"Start init for {server}", server) log(f"Start init for {server}", server)