From b16b5f627510dabc43ea734e58457b7c0357c363 Mon Sep 17 00:00:00 2001 From: Pragmatic Software Date: Sun, 13 Feb 2011 08:02:27 +0000 Subject: [PATCH] anti-flood: nick changes now linked to same account via reference --- PBot/AntiFlood.pm | 9 +++++---- PBot/VERSION.pm | 4 ++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/PBot/AntiFlood.pm b/PBot/AntiFlood.pm index 00352e62..c32fb6b1 100644 --- a/PBot/AntiFlood.pm +++ b/PBot/AntiFlood.pm @@ -1,8 +1,8 @@ # File: AntiFlood.pm # Author: pragma_ # -# Purpose: Keeps track of which nick has said what and when. Used in -# conjunction with OperatorStuff and Quotegrabs for kick/ban on flood +# Purpose: Keeps track of who has said what and when. Used in +# conjunction with ChanOps and Quotegrabs for kick/ban on flood # and grabbing quotes, respectively. package PBot::AntiFlood; @@ -71,8 +71,9 @@ sub get_flood_account { # (usually alternate-nicks due to rejoining) if($mask =~ m/!\Q$user\E@\Q$host\E$/i) { - $self->{pbot}->logger->log("anti-flood: [get-account] $nick!$user\@$host using existing mask $mask\n"); - return $mask; + $self->{pbot}->logger->log("anti-flood: [get-account] $nick!$user\@$host linked to $mask\n"); + $self->{message_history}->{"$nick!$user\@$host"} = $self->{message_history}->{$mask}; + return "$nick!$user\@$host"; } } diff --git a/PBot/VERSION.pm b/PBot/VERSION.pm index 14543569..059d5a45 100644 --- a/PBot/VERSION.pm +++ b/PBot/VERSION.pm @@ -13,8 +13,8 @@ use warnings; # These are set automatically by the build/commit script use constant { BUILD_NAME => "PBot", - BUILD_REVISION => 311, - BUILD_DATE => "2011-02-12", + BUILD_REVISION => 312, + BUILD_DATE => "2011-02-13", }; 1;