diff --git a/doc/CHANGELOG b/doc/CHANGELOG index 42db556..fb3566f 100644 --- a/doc/CHANGELOG +++ b/doc/CHANGELOG @@ -3,6 +3,7 @@ Auto IRC Bot 3.0: Change Log 3.0 Indev =============================================================================== + * Werewolf: Fixed an annoyance in VOTES. * Werewolf: Fixed another round of bugs. * Werewolf: Fixed a grammatical error. Thanks TAD! * Werewolf: Fixed a bug that occasionally caused a person to get wolf diff --git a/modules/Werewolf.pm b/modules/Werewolf.pm index 74b8a3b..66b1b4a 100644 --- a/modules/Werewolf.pm +++ b/modules/Werewolf.pm @@ -428,7 +428,12 @@ sub cmd_wolf { if (keys %LYNCH) { my $str; foreach my $key (sort {keys %{$LYNCH{$b}} <=> keys %{$LYNCH{$a}}} keys %LYNCH) { - $str .= ", $NICKS{$key}: ".keys(%{$LYNCH{$key}}).' ('.join(' ', keys %{$LYNCH{$key}}).')'; + my $voters = 0; + if (keys %{$LYNCH{$key}}) { + foreach (keys %{$LYNCH{$key}}) { $voters .= " $NICKS{$_}" } + } + $voters =~ s/^\s//xsm; + $str .= ", $NICKS{$key}: ".keys(%{$LYNCH{$key}})." ($voters)"; } $str = substr $str, 2; privmsg($src->{svr}, $src->{chan}, "$src->{nick}: $str");