mirror of
https://github.com/pragma-/pbot.git
synced 2025-05-03 13:17:33 +02:00
Improve nick-change evasion detection logic
This commit is contained in:
parent
82c53b2af7
commit
674a96431b
@ -860,9 +860,11 @@ sub check_bans {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (exists $self->{nickflood}->{$message_account} and $baninfo->{type} ne 'blacklist') {
|
if (exists $self->{nickflood}->{$message_account} and $self->{nickflood}->{$message_account}->{offenses} > 0 and $baninfo->{type} ne 'blacklist') {
|
||||||
$self->{pbot}->{logger}->log("anti-flood: [check-bans] $mask evading nick-flood ban, disregarding\n");
|
if (gettimeofday - $self->{nickflood}->{$message_account}->{timestamp} < 60 * 15) {
|
||||||
return;
|
$self->{pbot}->{logger}->log("anti-flood: [check-bans] $mask evading nick-flood ban, disregarding\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($baninfo->{type} eq 'blacklist') {
|
if ($baninfo->{type} eq 'blacklist') {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user