From f108c437fed190c548e6b1a181965c0d1b427628 Mon Sep 17 00:00:00 2001 From: Pragmatic Software Date: Sat, 28 Dec 2019 22:01:46 -0800 Subject: [PATCH] AntiRepeat: Do not enforce logged-in admins; respect `dont_enforce_antiflood` setting --- Plugins/AntiRepeat.pm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Plugins/AntiRepeat.pm b/Plugins/AntiRepeat.pm index 5c3332a7..6205aa91 100644 --- a/Plugins/AntiRepeat.pm +++ b/Plugins/AntiRepeat.pm @@ -66,9 +66,12 @@ sub on_public { my $antirepeat = $self->{pbot}->{registry}->get_value($channel, 'antirepeat'); return 0 if defined $antirepeat and not $antirepeat; + return 0 if $self->{pbot}->{registry}->get_value($channel, 'dont_enforce_antiflood'); + return 0 if $channel !~ m/^#/; return 0 if $event->{interpreted}; return 0 if $self->{pbot}->{antiflood}->whitelisted($channel, "$nick!$user\@$host", 'antiflood'); + return 0 if $self->{pbot}->{admins}->loggedin($channel, "$nick!$user\@$host"); my $account = $self->{pbot}->{messagehistory}->{database}->get_message_account($nick, $user, $host);