3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-11-26 13:59:47 +01:00

AntiFlood: less verbose logging of check_ban

This commit is contained in:
Pragmatic Software 2020-02-05 01:48:56 -08:00
parent 61f13f6b40
commit 6d9179913f

View File

@ -426,7 +426,6 @@ sub check_flood {
$self->{whois_pending}->{$nick} = gettimeofday; $self->{whois_pending}->{$nick} = gettimeofday;
} }
} else { } else {
$self->{pbot}->{logger}->log("Not validated; checking bans...\n");
$self->check_bans($account, "$nick!$user\@$host", $channel); $self->check_bans($account, "$nick!$user\@$host", $channel);
} }
} }
@ -798,13 +797,9 @@ sub check_bans {
my ($self, $message_account, $mask, $channel, $dry_run) = @_; my ($self, $message_account, $mask, $channel, $dry_run) = @_;
$channel = lc $channel; $channel = lc $channel;
return if not $self->{pbot}->{chanops}->can_gain_ops($channel);
my $user = $self->{pbot}->{users}->loggedin($channel, $mask); my $user = $self->{pbot}->{users}->loggedin($channel, $mask);
return 0 if $self->{pbot}->{capabilities}->userhas($user, 'botowner'); return if $self->{pbot}->{capabilities}->userhas($user, 'botowner');
if (not $self->{pbot}->{chanops}->can_gain_ops($channel)) {
$self->{pbot}->{logger}->log("anti-flood: [check-ban] I do not have ops for $channel, ignoring possible ban evasions.\n");
return;
}
my $debug_checkban = $self->{pbot}->{registry}->get_value('antiflood', 'debug_checkban'); my $debug_checkban = $self->{pbot}->{registry}->get_value('antiflood', 'debug_checkban');