From f6d2334e720f4accbb1d14e0e440f35a43be230c Mon Sep 17 00:00:00 2001 From: jcao219 Date: Sat, 23 Jul 2011 01:19:31 -0500 Subject: [PATCH] added some more things useful for debug like !revealroles --- wolfgame.py | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/wolfgame.py b/wolfgame.py index f050d74..f083ed3 100644 --- a/wolfgame.py +++ b/wolfgame.py @@ -333,9 +333,7 @@ def fjoin(cli, nick, chan, rest): else: cli.notice(nick, "No, that won't be allowed.") -@cmd("fleave", admin_only=True) -@cmd("fdel", admin_only=True) -@cmd("fquit", admin_only=True) +@cmd("fleave","fquit","fdel", admin_only=True) def fleave(cli, nick, chan, rest): for a in re.split("\s+",rest): a = a.strip() @@ -1923,7 +1921,8 @@ def help2(cli, nick, chan, rest): @hook("invite", raw_nick = False, admin_only = True) def on_invite(cli, nick, something, chan): - cli.join(chan) + if chan == botconfig.CHANNEL: + cli.join(chan) @@ -1938,7 +1937,6 @@ def show_admins(cli, nick, chan, rest): if (cloak in botconfig.ADMINS and 'G' not in status and user != botconfig.NICK and cloak not in var.AWAY): admins.append(user) - hk1 = HOOKS["whoreply"][-1] @@ -1948,7 +1946,6 @@ def show_admins(cli, nick, chan, rest): HOOKS.pop("whoreply") # todo, makes this better :( HOOKS.pop("endofwho") - hk2 = HOOKS["whoreply"][-1] cli.who(chan) @@ -1967,4 +1964,13 @@ def make_admin(cli, nick, chan, rest): return who = var.CLOAKS[ull.index(who.lower())] botconfig.ADMINS = botconfig.ADMINS + (who,) - cli.msg(chan, "Operation successful.") \ No newline at end of file + cli.msg(chan, "Operation successful.") + + + +@cmd("revealroles", admin_only=True) +def revroles(cli, nick, chan, rest): + cli.msg(chan, str(var.ROLES)) + #TODO: make this and other functions debug-mode only + + \ No newline at end of file