mirror of
https://github.com/pragma-/pbot.git
synced 2025-01-25 11:34:15 +01:00
antiflood: do not check flood if lag is uninitialized or is significant
This commit is contained in:
parent
1f45da7615
commit
c29a694359
@ -183,8 +183,8 @@ sub check_flood {
|
|||||||
# do not do flood processing if channel is not in bot's channel list or bot is not set as chanop for the channel
|
# do not do flood processing if channel is not in bot's channel list or bot is not set as chanop for the channel
|
||||||
return if ($channel =~ /^#/) and (not exists $self->{pbot}->channels->channels->hash->{$channel} or $self->{pbot}->channels->channels->hash->{$channel}{chanop} == 0);
|
return if ($channel =~ /^#/) and (not exists $self->{pbot}->channels->channels->hash->{$channel} or $self->{pbot}->channels->channels->hash->{$channel}{chanop} == 0);
|
||||||
|
|
||||||
# do not do flood processing for this event if lag is significant
|
# do not do flood processing for this event if lag is uninitialized or is significant
|
||||||
return if defined $self->{lag} and $self->{lag} >= 2;
|
return if not defined $self->{lag} or $self->{lag} >= 2;
|
||||||
|
|
||||||
if($max_messages > $self->{pbot}->{MAX_NICK_MESSAGES}) {
|
if($max_messages > $self->{pbot}->{MAX_NICK_MESSAGES}) {
|
||||||
$self->{pbot}->logger->log("Warning: max_messages greater than MAX_NICK_MESSAGES; truncating.\n");
|
$self->{pbot}->logger->log("Warning: max_messages greater than MAX_NICK_MESSAGES; truncating.\n");
|
||||||
|
@ -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 => 247,
|
BUILD_REVISION => 248,
|
||||||
BUILD_DATE => "2011-01-22",
|
BUILD_DATE => "2011-01-22",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user