mirror of
https://github.com/pragma-/pbot.git
synced 2024-11-02 18:19:33 +01:00
anti-flood: execute whois command more smartly
This commit is contained in:
parent
3bd73c4866
commit
e6e02259e4
@ -234,7 +234,6 @@ sub check_flood {
|
|||||||
my $account = $self->get_flood_account($nick, $user, $host);
|
my $account = $self->get_flood_account($nick, $user, $host);
|
||||||
|
|
||||||
if(not defined $account) {
|
if(not defined $account) {
|
||||||
$self->{pbot}->conn->whois($nick);
|
|
||||||
$account = $mask;
|
$account = $mask;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -284,6 +283,7 @@ sub check_flood {
|
|||||||
if($mode == $self->{FLOOD_JOIN} and $text =~ /^PART/) {
|
if($mode == $self->{FLOOD_JOIN} and $text =~ /^PART/) {
|
||||||
# don't check for evasion on PARTs
|
# don't check for evasion on PARTs
|
||||||
} else {
|
} else {
|
||||||
|
$self->{pbot}->conn->whois($nick);
|
||||||
$self->check_bans($account, $channel);
|
$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) {
|
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->{pbot}->logger->log("anti-flood: [devalidate-accounts] $account matches $mask_original in $channel, devalidating\n");
|
||||||
|
|
||||||
$self->message_history->{$account}->{channels}->{$channel}{validated} = 0;
|
$self->message_history->{$account}->{channels}->{$channel}{validated} = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -13,7 +13,7 @@ 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 => 515,
|
BUILD_REVISION => 516,
|
||||||
BUILD_DATE => "2014-03-08",
|
BUILD_DATE => "2014-03-08",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user