From 6651f19cb2664376dc0fdc460b89f8dec687e8f0 Mon Sep 17 00:00:00 2001 From: jcao219 Date: Fri, 8 Jul 2011 00:49:53 -0500 Subject: [PATCH] fixed bugs --- wolfgame.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/wolfgame.py b/wolfgame.py index 09fc50f..c543e01 100644 --- a/wolfgame.py +++ b/wolfgame.py @@ -447,9 +447,13 @@ def leave(cli, what, nick): if var.PHASE == "none" and what.startswith("!"): cli.notice(nick, "No game is currently running.") return + elif var.PHASE == "none": + return if nick not in var.list_players() and what.startswith("!"): # not playing cli.notice(nick, "You're not currently playing.") return + elif nick not in var.list_players(): + return msg = "" if what in ("!quit", "!leave"): msg = ("\u0002{0}\u0002 died of an unknown disease. "+ @@ -506,7 +510,7 @@ def transition_day(cli): var.DAY_START_TIME = datetime.now() if not var.NIGHT_START_TIME: for plr in var.list_players(): - cli.msg(plr, "You are a \u0002{0}\u0002.".format(var.get_role(plr)) + cli.msg(plr, "You are a \u0002{0}\u0002.".format(var.get_role(plr))) begin_day(cli) return