Add MC Down timer for ReplIRC

This commit is contained in:
Firepup Sixfifty 2024-04-30 18:52:21 -05:00
parent 2a7a4be401
commit 2339db32d3
Signed by: Firepup650
GPG key ID: 7C92E2ABBBFAB9BA
2 changed files with 5 additions and 1 deletions

View file

@ -42,7 +42,7 @@ servers: dict[str, dict[str, Any]] = {
"ignores": ["#fp-radio"], "ignores": ["#fp-radio"],
"admins": ["h-tl"], "admins": ["h-tl"],
"hosts": ["owner.firepi"], "hosts": ["owner.firepi"],
"threads": ["radio"], "threads": ["radio", "mc-down"],
}, },
"backupbox": { "backupbox": {
"address": "127.0.0.1", "address": "127.0.0.1",

View file

@ -112,7 +112,11 @@ def radio(instance: bare.bot) -> NoReturn:
instance.log("Thread while loop broken", "FATAL") instance.log("Thread while loop broken", "FATAL")
exit(1) exit(1)
def mcDown(instance: bare.bot) -> None:
instance.sendraw("TOPIC #firemc :FireMC Relay channel (offline)")
data: dict[str, dict[str, Any]] = { data: dict[str, dict[str, Any]] = {
"radio": {"noWrap": True, "func": radio, "args": []}, "radio": {"noWrap": True, "func": radio, "args": []},
"mc-down": {"noWrap": False, "func": mcDown, "args": [], "interval": 60}
} }