Moved .admins to info.py, and added a command to get the bot's prefix
This commit is contained in:
parent
28301e62e1
commit
284733d91a
2 changed files with 16 additions and 10 deletions
|
@ -8,16 +8,6 @@ import time
|
||||||
import subprocess
|
import subprocess
|
||||||
|
|
||||||
|
|
||||||
@hook.command(autohelp=False)
|
|
||||||
def admins(inp, notice=None, bot=None):
|
|
||||||
".admins -- Lists bot's admins."
|
|
||||||
if bot.config["admins"]:
|
|
||||||
notice("Admins are: %s." % ", ".join(bot.config["admins"]))
|
|
||||||
else:
|
|
||||||
notice("No users are admins!")
|
|
||||||
return
|
|
||||||
|
|
||||||
|
|
||||||
@hook.command(adminonly=True)
|
@hook.command(adminonly=True)
|
||||||
def addadmin(inp, notice=None, bot=None, config=None):
|
def addadmin(inp, notice=None, bot=None, config=None):
|
||||||
".addadmin <nick|host> -- Make <nick|host> an admin. " \
|
".addadmin <nick|host> -- Make <nick|host> an admin. " \
|
||||||
|
|
16
plugins/info.py
Normal file
16
plugins/info.py
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
from util import hook
|
||||||
|
|
||||||
|
@hook.command(autohelp=False)
|
||||||
|
def admins(inp, notice=None, bot=None):
|
||||||
|
".admins -- Lists bot's admins."
|
||||||
|
if bot.config["admins"]:
|
||||||
|
notice("Admins are: %s." % ", ".join(bot.config["admins"]))
|
||||||
|
else:
|
||||||
|
notice("No users are admins!")
|
||||||
|
return
|
||||||
|
|
||||||
|
|
||||||
|
@hook.command(autohelp=False)
|
||||||
|
def prefix(inp, notice=False, conn=False):
|
||||||
|
".prefix -- Shows the bot's command prefix"
|
||||||
|
notice("The prefix is: \"%s\"" % conn.conf["command_prefix"])
|
Reference in a new issue