diff --git a/PBot/AntiFlood.pm b/PBot/AntiFlood.pm index 36a3786f..0812f83a 100644 --- a/PBot/AntiFlood.pm +++ b/PBot/AntiFlood.pm @@ -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"); diff --git a/PBot/VERSION.pm b/PBot/VERSION.pm index 83f0c5ec..f3c9150b 100644 --- a/PBot/VERSION.pm +++ b/PBot/VERSION.pm @@ -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", };