From 6d9179913fa4dc821d5c0dedb1e5ab8ac7eafd3a Mon Sep 17 00:00:00 2001 From: Pragmatic Software Date: Wed, 5 Feb 2020 01:48:56 -0800 Subject: [PATCH] AntiFlood: less verbose logging of check_ban --- PBot/AntiFlood.pm | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/PBot/AntiFlood.pm b/PBot/AntiFlood.pm index b509c0e8..ecb4a7e9 100644 --- a/PBot/AntiFlood.pm +++ b/PBot/AntiFlood.pm @@ -426,7 +426,6 @@ sub check_flood { $self->{whois_pending}->{$nick} = gettimeofday; } } else { - $self->{pbot}->{logger}->log("Not validated; checking bans...\n"); $self->check_bans($account, "$nick!$user\@$host", $channel); } } @@ -798,13 +797,9 @@ sub check_bans { my ($self, $message_account, $mask, $channel, $dry_run) = @_; $channel = lc $channel; + return if not $self->{pbot}->{chanops}->can_gain_ops($channel); my $user = $self->{pbot}->{users}->loggedin($channel, $mask); - return 0 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; - } + return if $self->{pbot}->{capabilities}->userhas($user, 'botowner'); my $debug_checkban = $self->{pbot}->{registry}->get_value('antiflood', 'debug_checkban');