From 1e45c53d38ce167a4a9d12c70f4198e5e5029a3a Mon Sep 17 00:00:00 2001 From: Elijah Perrault Date: Sat, 9 Apr 2011 19:33:01 -0600 Subject: [PATCH] Fixed two major bugs in Werewolf that messed up game play. --- doc/CHANGELOG | 1 + modules/Werewolf.pm | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/CHANGELOG b/doc/CHANGELOG index 7c483db..7108829 100644 --- a/doc/CHANGELOG +++ b/doc/CHANGELOG @@ -3,6 +3,7 @@ Auto IRC Bot 3.0: Change Log 3.0 Indev =============================================================================== + * Fixed two major bugs in Werewolf that messed up game play. * Fixed several bugs and changed around JOIN/START/BEGIN in Werewolf. * Fixed parsing of host masks with / in them. (if it was broken) * Werewolf: Fixed a leave before game begin bug. diff --git a/modules/Werewolf.pm b/modules/Werewolf.pm index c792600..ca96365 100644 --- a/modules/Werewolf.pm +++ b/modules/Werewolf.pm @@ -95,7 +95,7 @@ sub cmd_wolf { # WOLF JOIN # Check if a game is running. - if (!$PGAME) { + if (!$PGAME and !$GAME) { # Check if this is the game channel. if (conf_get('werewolf:chan')) { if ($src->{svr}.'/'.$src->{chan} ne (conf_get('werewolf:chan'))[0][0]) { @@ -1327,6 +1327,7 @@ sub _gameover { # Clear all variables. if ($PHASE) { if ($PHASE eq 'n') { timer_del('werewolf.goto_daytime') } } + if ($PGAME) { timer_del('werewolf.join_wait') } $GAME = $PGAME = $GAMECHAN = $GAMETIME = $WAIT = $PHASE = $SEEN = $VISIT = $GUARD = $LVOTEN = $SHOT = $DETECTED = 0; %PLAYERS = (); %NICKS = ();