Add MC Down timer for ReplIRC
This commit is contained in:
parent
2a7a4be401
commit
2339db32d3
2 changed files with 5 additions and 1 deletions
|
@ -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",
|
||||||
|
|
|
@ -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}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue