Don't deadlock if the bot gets banned
This commit is contained in:
parent
85c81d3c6c
commit
799176cf81
2 changed files with 6 additions and 1 deletions
5
bot.py
5
bot.py
|
@ -125,6 +125,11 @@ class bot(bare.bot):
|
|||
if origin != "null":
|
||||
self.msg(f"{chan} is +i, and I'm not invited.", origin)
|
||||
break
|
||||
elif code == 474:
|
||||
self.log(f"Joining {chan} failed (+b)", "WARN")
|
||||
if origin != "null":
|
||||
self.msg(f"I'm banned from {chan}.", origin)
|
||||
break
|
||||
elif code == 520:
|
||||
self.log(f"Joining {chan} failed (+O)", "WARN")
|
||||
if origin != "null":
|
||||
|
|
|
@ -6,7 +6,7 @@ from typing import Optional, Any
|
|||
import bare
|
||||
|
||||
load_dotenv()
|
||||
__version__ = "v2.0.9"
|
||||
__version__ = "v2.0.10"
|
||||
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]] = {
|
||||
|
|
Loading…
Reference in a new issue