From a9d6e3482b0a3b987fad2aed30f73f4e3f68f6ec Mon Sep 17 00:00:00 2001 From: Elijah Perrault Date: Tue, 12 Apr 2011 22:05:16 -0600 Subject: [PATCH] More cleanup. --- modules/Werewolf.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/Werewolf.pm b/modules/Werewolf.pm index 6ac240e..b745412 100644 --- a/modules/Werewolf.pm +++ b/modules/Werewolf.pm @@ -202,7 +202,7 @@ sub cmd_wolf { if (keys %PLAYERS >= 16 and conf_get('werewolf:detectives')) { $cdetectives++ } # Give all players a role. - while ((my $plyr, undef) = each %PLAYERS) { $PLAYERS{$plyr} = 'v' } + foreach my $plyr (keys %PLAYERS) { $PLAYERS{$plyr} = 'v' } # Push players into a temporary array. my @plyrs = keys %PLAYERS; @@ -1006,7 +1006,7 @@ sub _init_night { $pi =~ s/^,\s//xsm; $data[1] =~ s/&pi&/Players: $pi/gxsm; my $ph; - while ((my $pnick, undef) = each %PLAYERS) { if ($pnick eq $plyr) { next }; $ph .= ", $NICKS{$pnick}" } + foreach my $pnick (keys %PLAYERS) { if ($pnick eq $plyr) { next }; $ph .= ", $NICKS{$pnick}" } $ph =~ s/^,\s//xsm; $data[1] =~ s/&ph&/Players: $ph/gxsm;