Change admin auth
This commit is contained in:
parent
bcbcd25861
commit
f2483d0ef0
|
@ -1,8 +1,10 @@
|
|||
import plugin, os
|
||||
|
||||
BOT_NICKS = ["minerobber"]
|
||||
|
||||
@plugin.listener("admin")
|
||||
def admin(bot,channel,nick,msg):
|
||||
if not bot.is_admin: return
|
||||
if nick not in BOT_NICKS: return
|
||||
if not msg.startswith(bot.nick+": "): return
|
||||
args = msg[len(bot.nick)+2:].split()
|
||||
subcmd = args.pop(0)
|
||||
|
@ -31,6 +33,10 @@ def admin(bot,channel,nick,msg):
|
|||
elif subcmd=="pull":
|
||||
subprocess.run("git pull",shell=True)
|
||||
bot.load_modules()
|
||||
elif subcmd=="add":
|
||||
BOT_NICKS.append(args.pop(0))
|
||||
elif subcmd=="del":
|
||||
BOT_NICKS.remove(args.pop(0))
|
||||
|
||||
@plugin.listener("water_joke")
|
||||
def water_joke(bot,channel,nick,msg):
|
||||
|
|
Loading…
Reference in New Issue