3
0
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:
Pragmatic Software 2010-04-14 00:01:42 +00:00
parent c5e1903ded
commit 042366b55b

View File

@ -151,15 +151,15 @@ sub check_ignore {
if(not exists $self->{last_timestamp}->{$channel}) {
$self->{last_timestamp}->{$channel} = $now;
} elsif($now - $self->{last_timestamp}->{$channel} >= 15) {
} elsif($now - $self->{last_timestamp}->{$channel} >= 30) {
$self->{last_timestamp}->{$channel} = $now;
if($self->{ignore_flood_counter}->{$channel} > 0) {
$self->{ignore_flood_counter}->{$channel}--;
$pbot->logger->log("flood_msg decremented to $self->{ignore_flood_counter}->{$channel}\n");
$self->{ignore_flood_counter}->{$channel} = 0;
$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");
$self->{pbot}->{ignorelistcmds}->ignore_user("", "floodcontrol", "", "", ".* $channel 300");
$self->{ignore_flood_counter}->{$channel} = 0;