3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-12-23 19:22:40 +01:00

ban evasion: fixed whitelist logic

This commit is contained in:
Pragmatic Software 2011-12-12 16:40:22 +00:00
parent 016aba76db
commit 2fb0598a0e
2 changed files with 12 additions and 12 deletions

View File

@ -475,18 +475,18 @@ sub check_nickserv_accounts {
my $baninfo = $self->{pbot}->bantracker->get_baninfo($mask);
if(defined $baninfo) {
if($self->ban_whitelisted($baninfo->{channel}, $baninfo->{banmask})) {
$self->{pbot}->logger->log("anti-flood: [check-bans] $mask evaded $baninfo->{banmask} in $baninfo->{channel}, but allowed through whitelist\n");
next;
}
if(defined $baninfo) {
} else {
$self->{pbot}->logger->log("anti-flood: [check-bans] $mask evaded $baninfo->{banmask} banned in $baninfo->{channel} by $baninfo->{owner}\n");
push @banned_channels, $baninfo->{channel};
$self->{pbot}->conn->privmsg($nick, "You have been banned in $baninfo->{channel} for attempting to evade a ban on $baninfo->{banmask} set by $baninfo->{owner}");
}
}
}
}
else {
# no nickserv account set yet
if($mask =~ m/^\Q$nick\E!/i) {

View File

@ -13,8 +13,8 @@ use warnings;
# These are set automatically by the build/commit script
use constant {
BUILD_NAME => "PBot",
BUILD_REVISION => 334,
BUILD_DATE => "2011-12-11",
BUILD_REVISION => 335,
BUILD_DATE => "2011-12-12",
};
1;