Werewolf: Fixed a nasty lynch nick exploit.

This commit is contained in:
Elijah Perrault committed 2011-04-16 02:08:15 -06:00
1 parent 503a7ed990
commit 38b3e4c3d8
2 files changed
+5 -1

No files matched your search

+1
View File
@@ -3,6 +3,7 @@ Auto IRC Bot 3.0: Change Log
3.0 Indev 3.0 Indev
=============================================================================== ===============================================================================
* Werewolf: Fixed a nasty lynch nick exploit.
* Fixed an issue in HELP. * Fixed an issue in HELP.
* Added a Ping module. * Added a Ping module.
* Moved Werewolf back to stable. * Moved Werewolf back to stable.
+4 -1
View File
@@ -1498,12 +1498,15 @@ sub on_nick {
$LYNCH{$new} = $LYNCH{lc $src->{nick}}; $LYNCH{$new} = $LYNCH{lc $src->{nick}};
delete $LYNCH{lc $src->{nick}}; delete $LYNCH{lc $src->{nick}};
} }
while (my ($accu, $ser) = each %LYNCH) { foreach my $accu ($sers) {
%sers = %{$sers};
foreach my $ser (%sers) {
if ($ser eq lc $src->{nick}) { if ($ser eq lc $src->{nick}) {
$LYNCH{$accu}{$new} = 1; $LYNCH{$accu}{$new} = 1;
delete $LYNCH{$accu}{$ser}; delete $LYNCH{$accu}{$ser};
} }
} }
}
# That should be everything. # That should be everything.
} }
} }