mirror of
https://github.com/pragma-/pbot.git
synced 2024-12-23 11:12:42 +01:00
ban evasion: fixed whitelist logic
This commit is contained in:
parent
016aba76db
commit
2fb0598a0e
@ -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) {
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user