From a8ea3f0e6421d59db6aa30bd6ad13f5596a89c5e Mon Sep 17 00:00:00 2001 From: Elijah Perrault Date: Thu, 21 Apr 2011 14:08:47 -0600 Subject: [PATCH] Fixed significant state mismatched data bugs. --- NEWS | 2 +- doc/CHANGELOG | 1 + lib/Core/IRC.pm | 2 +- lib/Proto/IRC.pm | 4 ++-- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/NEWS b/NEWS index 4bea056..a2198bf 100644 --- a/NEWS +++ b/NEWS @@ -18,7 +18,7 @@ In this alpha11 release, we have added: Bug fixes: -None +* Fixed significant state mismatched data bugs. Incompatibilities: diff --git a/doc/CHANGELOG b/doc/CHANGELOG index a864353..c6ae33f 100644 --- a/doc/CHANGELOG +++ b/doc/CHANGELOG @@ -3,6 +3,7 @@ Auto IRC Bot 3.0: Change Log 3.0 Indev =============================================================================== + * Fixed significant state mismatched data bugs. * Added API::IRC::ison for checking if a user is on a channel. * Werewolf: Fixed a bug in harlot staying home. * Werewolf: Various bug fixes. diff --git a/lib/Core/IRC.pm b/lib/Core/IRC.pm index e55b541..f62460d 100644 --- a/lib/Core/IRC.pm +++ b/lib/Core/IRC.pm @@ -97,7 +97,7 @@ hook_add("on_quit", "quit_update_chanusers", sub { # Delete the user from all channels. foreach my $ccu (keys %{ $State::IRC::chanusers{$src{svr}}}) { - if (defined $State::IRC::chanusers{$src{svr}}{$ccu}{$src{nick}}) { delete $State::IRC::chanusers{$src{svr}}{$ccu}{$src{nick}} } + if (defined $State::IRC::chanusers{$src{svr}}{$ccu}{lc $src{nick}}) { delete $State::IRC::chanusers{$src{svr}}{$ccu}{lc $src{nick}} } } return 1; diff --git a/lib/Proto/IRC.pm b/lib/Proto/IRC.pm index 784aaa9..47b8199 100644 --- a/lib/Proto/IRC.pm +++ b/lib/Proto/IRC.pm @@ -410,7 +410,7 @@ sub kick { } else { # We weren't. Update chanusers and trigger on_kick. - if (defined $State::IRC::chanusers{$svr}{$ex[2]}{$ex[3]}) { delete $State::IRC::chanusers{$svr}{$ex[2]}{$ex[3]} } + if (defined $State::IRC::chanusers{$svr}{$ex[2]}{lc $ex[3]}) { delete $State::IRC::chanusers{$svr}{$ex[2]}{lc $ex[3]} } API::Std::event_run("on_kick", (\%src, $ex[2], $ex[3], $msg)); } @@ -578,7 +578,7 @@ sub part { } else { # Delete them from chanusers. - delete $State::IRC::chanusers{$svr}{$ex[2]}{$src{nick}} if defined $State::IRC::chanusers{$svr}{$ex[2]}{$src{nick}}; + delete $State::IRC::chanusers{$svr}{$ex[2]}{lc $src{nick}} if defined $State::IRC::chanusers{$svr}{$ex[2]}{lc $src{nick}}; # Set $msg to the part message. my $msg = 0;