Moved .admins to info.py, and added a command to get the bot's prefix

This commit is contained in:
neersighted 2012-05-15 19:37:47 -07:00
parent 28301e62e1
commit 284733d91a
2 changed files with 16 additions and 10 deletions

View file

@ -8,16 +8,6 @@ import time
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)
def addadmin(inp, notice=None, bot=None, config=None):
".addadmin <nick|host> -- Make <nick|host> an admin. " \

16
plugins/info.py Normal file
View 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"])