mirror of
https://github.com/pragma-/pbot.git
synced 2024-11-26 22:09:26 +01:00
Overwhelm was too sensitive
This commit is contained in:
parent
c5e1903ded
commit
042366b55b
@ -151,15 +151,15 @@ sub check_ignore {
|
|||||||
|
|
||||||
if(not exists $self->{last_timestamp}->{$channel}) {
|
if(not exists $self->{last_timestamp}->{$channel}) {
|
||||||
$self->{last_timestamp}->{$channel} = $now;
|
$self->{last_timestamp}->{$channel} = $now;
|
||||||
} elsif($now - $self->{last_timestamp}->{$channel} >= 15) {
|
} elsif($now - $self->{last_timestamp}->{$channel} >= 30) {
|
||||||
$self->{last_timestamp}->{$channel} = $now;
|
$self->{last_timestamp}->{$channel} = $now;
|
||||||
if($self->{ignore_flood_counter}->{$channel} > 0) {
|
if($self->{ignore_flood_counter}->{$channel} > 0) {
|
||||||
$self->{ignore_flood_counter}->{$channel}--;
|
$self->{ignore_flood_counter}->{$channel} = 0;
|
||||||
$pbot->logger->log("flood_msg decremented to $self->{ignore_flood_counter}->{$channel}\n");
|
$pbot->logger->log("flood_msg reset");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(($self->{ignore_flood_counter}->{$channel} > 5) or ($channel =~ /^#osdev$/i and $self->{ignore_flood_counter}->{$channel} >= 3)) {
|
if(($self->{ignore_flood_counter}->{$channel} > 5) or ($channel =~ /^#osdev$/i and $self->{ignore_flood_counter}->{$channel} >= 4)) {
|
||||||
$pbot->logger->log("flood_msg exceeded! [$self->{ignore_flood_counter}->{$channel}]\n");
|
$pbot->logger->log("flood_msg exceeded! [$self->{ignore_flood_counter}->{$channel}]\n");
|
||||||
$self->{pbot}->{ignorelistcmds}->ignore_user("", "floodcontrol", "", "", ".* $channel 300");
|
$self->{pbot}->{ignorelistcmds}->ignore_user("", "floodcontrol", "", "", ".* $channel 300");
|
||||||
$self->{ignore_flood_counter}->{$channel} = 0;
|
$self->{ignore_flood_counter}->{$channel} = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user