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
+8 -4

No files matched your search

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