Add support for +S and +A
This commit is contained in:
parent
d2479bc23f
commit
400a29db99
2 changed files with 11 additions and 1 deletions
10
bot.py
10
bot.py
|
@ -130,6 +130,16 @@ class bot(bare.bot):
|
||||||
if origin != "null":
|
if origin != "null":
|
||||||
self.msg(f"I'm banned from {chan}.", origin)
|
self.msg(f"I'm banned from {chan}.", origin)
|
||||||
break
|
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:
|
elif code == 520:
|
||||||
self.log(f"Joining {chan} failed (+O)", "WARN")
|
self.log(f"Joining {chan} failed (+O)", "WARN")
|
||||||
if origin != "null":
|
if origin != "null":
|
||||||
|
|
|
@ -6,7 +6,7 @@ from typing import Optional, Any
|
||||||
import bare
|
import bare
|
||||||
|
|
||||||
load_dotenv()
|
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]
|
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 .*))$"
|
su = "^(su|sudo|(su .*|sudo .*))$"
|
||||||
servers: dict[str, dict[str, Any]] = {
|
servers: dict[str, dict[str, Any]] = {
|
||||||
|
|
Loading…
Reference in a new issue