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:
parent
016aba76db
commit
2fb0598a0e
@ -475,18 +475,18 @@ sub check_nickserv_accounts {
|
|||||||
|
|
||||||
my $baninfo = $self->{pbot}->bantracker->get_baninfo($mask);
|
my $baninfo = $self->{pbot}->bantracker->get_baninfo($mask);
|
||||||
|
|
||||||
|
if(defined $baninfo) {
|
||||||
if($self->ban_whitelisted($baninfo->{channel}, $baninfo->{banmask})) {
|
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");
|
$self->{pbot}->logger->log("anti-flood: [check-bans] $mask evaded $baninfo->{banmask} in $baninfo->{channel}, but allowed through whitelist\n");
|
||||||
next;
|
next;
|
||||||
}
|
} else {
|
||||||
|
|
||||||
if(defined $baninfo) {
|
|
||||||
$self->{pbot}->logger->log("anti-flood: [check-bans] $mask evaded $baninfo->{banmask} banned in $baninfo->{channel} by $baninfo->{owner}\n");
|
$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};
|
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}");
|
$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 {
|
else {
|
||||||
# no nickserv account set yet
|
# no nickserv account set yet
|
||||||
if($mask =~ m/^\Q$nick\E!/i) {
|
if($mask =~ m/^\Q$nick\E!/i) {
|
||||||
|
@ -13,8 +13,8 @@ use warnings;
|
|||||||
# These are set automatically by the build/commit script
|
# These are set automatically by the build/commit script
|
||||||
use constant {
|
use constant {
|
||||||
BUILD_NAME => "PBot",
|
BUILD_NAME => "PBot",
|
||||||
BUILD_REVISION => 334,
|
BUILD_REVISION => 335,
|
||||||
BUILD_DATE => "2011-12-11",
|
BUILD_DATE => "2011-12-12",
|
||||||
};
|
};
|
||||||
|
|
||||||
1;
|
1;
|
||||||
|
Loading…
Reference in New Issue
Block a user