3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-10-01 17:16:39 +02:00

AntiRepeat: Do not enforce logged-in admins; respect dont_enforce_antiflood setting

This commit is contained in:
Pragmatic Software 2019-12-28 22:01:46 -08:00
parent 2106497f5d
commit f108c437fe

View File

@ -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);