Fixed a minor retract bug in Werewolf.
This commit is contained in:
1 parent
1e45c53d38
commit
6dd9ab5322
2 files changed
+4
-2
No files matched your search
@@ -3,6 +3,7 @@ Auto IRC Bot 3.0: Change Log
|
||||
|
||||
3.0 Indev
|
||||
===============================================================================
|
||||
* Fixed a minor retract bug in Werewolf.
|
||||
* 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)
|
||||
|
||||
+3
-2
@@ -384,14 +384,15 @@ sub cmd_wolf {
|
||||
}
|
||||
|
||||
# Delete their vote.
|
||||
my $hvi;
|
||||
my ($hvi, $target);
|
||||
foreach my $plyr (keys %LYNCH) {
|
||||
if (exists $LYNCH{$plyr}{lc $src->{nick}}) { $hvi = 1; delete $LYNCH{$plyr}{lc $src->{nick}} }
|
||||
if (exists $LYNCH{$plyr}{lc $src->{nick}}) { $hvi = 1; delete $LYNCH{$plyr}{lc $src->{nick}}; $target = $plyr }
|
||||
}
|
||||
|
||||
# Done.
|
||||
if ($hvi) {
|
||||
privmsg($src->{svr}, $src->{chan}, "\2$src->{nick}\2 retracted his/her vote.");
|
||||
if (!keys %{$LYNCH{$target}}) { delete $LYNCH{$target} }
|
||||
}
|
||||
else {
|
||||
notice($src->{svr}, $src->{nick}, 'You haven\'t voted yet.');
|
||||
|
||||
Reference in new issue
Block a user