mirror of
https://github.com/pragma-/pbot.git
synced 2024-11-26 22:09:26 +01:00
anti-flood: nick changes now linked to same account via reference
This commit is contained in:
parent
3c6288920e
commit
b16b5f6275
@ -1,8 +1,8 @@
|
|||||||
# File: AntiFlood.pm
|
# File: AntiFlood.pm
|
||||||
# Author: pragma_
|
# Author: pragma_
|
||||||
#
|
#
|
||||||
# Purpose: Keeps track of which nick has said what and when. Used in
|
# Purpose: Keeps track of who has said what and when. Used in
|
||||||
# conjunction with OperatorStuff and Quotegrabs for kick/ban on flood
|
# conjunction with ChanOps and Quotegrabs for kick/ban on flood
|
||||||
# and grabbing quotes, respectively.
|
# and grabbing quotes, respectively.
|
||||||
|
|
||||||
package PBot::AntiFlood;
|
package PBot::AntiFlood;
|
||||||
@ -71,8 +71,9 @@ sub get_flood_account {
|
|||||||
# (usually alternate-nicks due to rejoining)
|
# (usually alternate-nicks due to rejoining)
|
||||||
|
|
||||||
if($mask =~ m/!\Q$user\E@\Q$host\E$/i) {
|
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");
|
$self->{pbot}->logger->log("anti-flood: [get-account] $nick!$user\@$host linked to $mask\n");
|
||||||
return $mask;
|
$self->{message_history}->{"$nick!$user\@$host"} = $self->{message_history}->{$mask};
|
||||||
|
return "$nick!$user\@$host";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -13,8 +13,8 @@ use warnings;
|
|||||||
# These are set automatically by the build/commit script
|
# These are set automatically by the build/commit script
|
||||||
use constant {
|
use constant {
|
||||||
BUILD_NAME => "PBot",
|
BUILD_NAME => "PBot",
|
||||||
BUILD_REVISION => 311,
|
BUILD_REVISION => 312,
|
||||||
BUILD_DATE => "2011-02-12",
|
BUILD_DATE => "2011-02-13",
|
||||||
};
|
};
|
||||||
|
|
||||||
1;
|
1;
|
||||||
|
Loading…
Reference in New Issue
Block a user