Tweaked code, moved admins back to admins.py, moved channels to info.py

This commit is contained in:
Luke Rogers 2012-05-17 07:32:48 +12:00
parent 4826df54f9
commit 59c8273820
2 changed files with 12 additions and 11 deletions

View file

@ -1,16 +1,13 @@
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
def channels(inp, conn=None):
"channels -- Lists the channels that the bot is in."
return "I am in these channels: %s" % ", ".join(conn.channels)
@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"])
notice('The command prefix is "%s"' % conn.conf["command_prefix"])