From 284733d91a548530f96d28c77ead37aeb711e12a Mon Sep 17 00:00:00 2001 From: neersighted Date: Tue, 15 May 2012 19:37:47 -0700 Subject: [PATCH] Moved .admins to info.py, and added a command to get the bot's prefix --- plugins/admin.py | 10 ---------- plugins/info.py | 16 ++++++++++++++++ 2 files changed, 16 insertions(+), 10 deletions(-) create mode 100644 plugins/info.py diff --git a/plugins/admin.py b/plugins/admin.py index 94c1abe..125e34e 100755 --- a/plugins/admin.py +++ b/plugins/admin.py @@ -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 -- Make an admin. " \ diff --git a/plugins/info.py b/plugins/info.py new file mode 100644 index 0000000..ea9acfb --- /dev/null +++ b/plugins/info.py @@ -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"]) \ No newline at end of file