antiflood: do not check accounts if no account

This commit is contained in:
Pragmatic Software 2011-12-12 23:33:39 +00:00
parent fa01bdde6f
commit 036ae7cdfb
2 changed files with 2 additions and 2 deletions

View File

@ -144,7 +144,7 @@ sub get_flood_account {
if($mask =~ m/!\Q$user\E@\Q$host\E$/i) {
$self->{pbot}->logger->log("anti-flood: [get-account] $nick!$user\@$host linked to $mask\n");
$self->{message_history}->{"$nick!$user\@$host"} = $self->{message_history}->{$mask};
$self->check_nickserv_accounts($nick, $self->{message_history}->{$mask}->{nickserv_account});
$self->check_nickserv_accounts($nick, $self->{message_history}->{$mask}->{nickserv_account}) if defined $self->{message_history}->{$mask}->{nickserv_account};
return "$nick!$user\@$host";
}
}

View File

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