diff --git a/bot.py b/bot.py index c547c57..8d3857b 100644 --- a/bot.py +++ b/bot.py @@ -130,6 +130,16 @@ class bot(bare.bot): if origin != "null": self.msg(f"I'm banned from {chan}.", origin) break + elif code == 480: + self.log(f"Joining {chan} failed (+S)", "WARN") + if origin != "null": + self.msg(f"{chan} is +S, and I'm not connected over SSL.", origin) + break + elif code == 519: + self.log(f"Joining {chan} failed (+A)", "WARN") + if origin != "null": + self.msg(f"{chan} is +A, and I'm not an admin.", origin) + break elif code == 520: self.log(f"Joining {chan} failed (+O)", "WARN") if origin != "null": diff --git a/config.py b/config.py index e6aff97..aae5581 100644 --- a/config.py +++ b/config.py @@ -6,7 +6,7 @@ from typing import Optional, Any import bare load_dotenv() -__version__ = "v2.0.10" +__version__ = "v2.0.11" npbase: str = "\[\x0303last\.fm\x03\] [A-Za-z0-9_[\]{}\\|\-^]{1,$MAX} (is listening|last listened) to: \x02.+ - .*\x02( \([0-9]+ plays\)( \[.*\])?)?" # pyright: ignore [reportInvalidStringEscapeSequence] su = "^(su|sudo|(su .*|sudo .*))$" servers: dict[str, dict[str, Any]] = {