Add support for +S and +A

This commit is contained in:
Firepup Sixfifty 2024-02-15 22:09:53 -06:00
parent d2479bc23f
commit 400a29db99
Signed by: Firepup650
GPG key ID: 7C92E2ABBBFAB9BA
2 changed files with 11 additions and 1 deletions

10
bot.py
View file

@ -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":

View file

@ -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]] = {