anti-flood: execute whois command more smartly

This commit is contained in:
Pragmatic Software 2014-03-09 07:15:50 +00:00
parent 3bd73c4866
commit e6e02259e4
2 changed files with 2 additions and 3 deletions

View File

@ -234,7 +234,6 @@ sub check_flood {
my $account = $self->get_flood_account($nick, $user, $host);
if(not defined $account) {
$self->{pbot}->conn->whois($nick);
$account = $mask;
}
@ -284,6 +283,7 @@ sub check_flood {
if($mode == $self->{FLOOD_JOIN} and $text =~ /^PART/) {
# don't check for evasion on PARTs
} else {
$self->{pbot}->conn->whois($nick);
$self->check_bans($account, $channel);
}
}
@ -515,7 +515,6 @@ sub devalidate_accounts {
if((defined $nickserv_account and $nickserv_account eq $ban_account) or $account =~ m/^$mask$/i) {
$self->{pbot}->logger->log("anti-flood: [devalidate-accounts] $account matches $mask_original in $channel, devalidating\n");
$self->message_history->{$account}->{channels}->{$channel}{validated} = 0;
}
}

View File

@ -13,7 +13,7 @@ use warnings;
# These are set automatically by the build/commit script
use constant {
BUILD_NAME => "PBot",
BUILD_REVISION => 515,
BUILD_REVISION => 516,
BUILD_DATE => "2014-03-08",
};