Compare commits
2 commits
9402a536f7
...
40ff789fe1
Author | SHA1 | Date | |
---|---|---|---|
40ff789fe1 | |||
e5a1ac6897 |
3 changed files with 9 additions and 3 deletions
|
@ -185,11 +185,11 @@ def reboot(bot: bare.bot, chan: str, name: str, message: str) -> None:
|
|||
|
||||
def sudo(bot: bare.bot, chan: str, name: str, message: str) -> None:
|
||||
if checks.admin(bot, name):
|
||||
bot.msg("Error - system failure, contact system operator", chan)
|
||||
bot.msg("Operation not permitted", chan)
|
||||
elif "bot" in name.lower():
|
||||
bot.log("lol, no.")
|
||||
else:
|
||||
bot.msg("Access Denied", chan)
|
||||
bot.msg('sudo: a password is required', chan)
|
||||
|
||||
|
||||
def nowplaying(bot: bare.bot, chan: str, name: str, message: str) -> None:
|
||||
|
|
|
@ -52,6 +52,7 @@ servers: dict[str, dict[str, Any]] = {
|
|||
"address": "irc.underworld.no",
|
||||
"channels": {"#random": 0, "#dice": 0},
|
||||
"hosts": ["154.sub-174-251-241.myvzw.com"],
|
||||
"threads": ["pingMon"],
|
||||
"dnsblMode": "kickban",
|
||||
},
|
||||
"replirc": {
|
||||
|
|
|
@ -148,7 +148,12 @@ def radio(instance: bare.bot) -> NoReturn:
|
|||
instance.log("Thread while loop broken", "FATAL")
|
||||
exit(1)
|
||||
|
||||
def ping(instance: bare.bot) -> NoReturn:
|
||||
while 1:
|
||||
instance.sendraw("PING :keepalive")
|
||||
sleep(30)
|
||||
|
||||
data: dict[str, dict[str, Any]] = {
|
||||
"radio": {"noWrap": True, "func": radio, "passInstance": True}
|
||||
"radio": {"noWrap": True, "func": radio, "passInstance": True},
|
||||
"pingMon": {"noWrap": True, "func": ping, "passInstance": True}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue