diff --git a/bot.py b/bot.py index 3c54180..6ed5c0d 100644 --- a/bot.py +++ b/bot.py @@ -233,9 +233,9 @@ class bot(bare.bot): if self.queue: return bytes(self.queue.pop(0)) data = bytes(self.sock.recv(2048)) - while !data.endswith(b"\r\n") + while not data.endswith(b"\r\n"): data += bytes(self.sock.recv(2048)) - data.rstrip(b"\r\n") + data = bytes(data.strip(b"\r\n")) if b"\r\n" in data: self.queue.extend(data.split(b"\r\n")) return bytes(self.queue.pop(0)) diff --git a/config.py b/config.py index 07c5205..432e23b 100644 --- a/config.py +++ b/config.py @@ -10,7 +10,7 @@ ipbl = DNSBLIpChecker() hsbl = DNSBLDomainChecker() load_dotenv() -__version__ = "v3.0.13" +__version__ = "v3.0.14" npbase: str = ( "\[\x0303last\.fm\x03\] [A-Za-z0-9_[\]{}\\|\-^]{1,$MAX} (is listening|last listened) to: \x02.+ - .*\x02( \([0-9]+ plays\)( \[.*\])?)?" # pyright: ignore [reportInvalidStringEscapeSequence] )