From 522a0a44c373c3d1f1afa894468dedeb2057ae53 Mon Sep 17 00:00:00 2001 From: jcao219 Date: Thu, 28 Jul 2011 21:52:42 -0500 Subject: [PATCH] !votes from non-players are now allowed, !rehash added (but it's not very useful) --- wolfgame.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/wolfgame.py b/wolfgame.py index 9dff9af..8c3b5d4 100644 --- a/wolfgame.py +++ b/wolfgame.py @@ -21,6 +21,7 @@ import re import logging import sys import os +import imp COMMANDS = {} PM_COMMANDS = {} @@ -205,6 +206,16 @@ def restart_program(cli, nick, chan, rest): print("RESTARTING") python = sys.executable os.execl(python, python, *sys.argv) + + + +@cmd("rehash", admin_only=True) +def rehash(cli, nick, chan, rest): + reset(cli) + imp.reload(var) + imp.reload(botconfig) + cli.msg(chan, "Configuration reloaded") + @@ -535,9 +546,6 @@ def show_votes(cli, nick, chan, rest): if var.PHASE in ("none", "join"): cli.notice(nick, "No game is currently running.") return - elif nick not in var.list_players(): - cli.notice(nick, "You're not currently playing.") - return if var.PHASE != "day": cli.notice(nick, "Voting is only during the day.") return