antiflood: do not check flood if lag is uninitialized or is significant

This commit is contained in:
Pragmatic Software 2011-01-22 09:45:16 +00:00
parent 1f45da7615
commit c29a694359
2 changed files with 3 additions and 3 deletions

View File

@ -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
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
return if defined $self->{lag} and $self->{lag} >= 2;
# do not do flood processing for this event if lag is uninitialized or is significant
return if not defined $self->{lag} or $self->{lag} >= 2;
if($max_messages > $self->{pbot}->{MAX_NICK_MESSAGES}) {
$self->{pbot}->logger->log("Warning: max_messages greater than MAX_NICK_MESSAGES; truncating.\n");

View File

@ -13,7 +13,7 @@ use warnings;
# These are set automatically by the build/commit script
use constant {
BUILD_NAME => "PBot",
BUILD_REVISION => 247,
BUILD_REVISION => 248,
BUILD_DATE => "2011-01-22",
};