Plugins/AntiTwitter: disregard whitelisted users

This commit is contained in:
Pragmatic Software 2020-05-21 19:25:31 -07:00
parent beef46f120
commit 2af12c97f5
1 changed files with 3 additions and 0 deletions

View File

@ -42,6 +42,9 @@ sub on_public {
$channel = lc $channel;
return 0 if not $self->{pbot}->{chanops}->can_gain_ops($channel);
my $u = $self->{pbot}->{users}->loggedin($channel, "$nick!$user\@$host");
return 0 if $self->{pbot}->{capabilities}->userhas($u, 'is-whitelisted');
while ($msg =~ m/\B[@]([a-z0-9_^{}\-\\\[\]\|]+)/ig) {
my $n = $1;
if ($self->{pbot}->{nicklist}->is_present_similar($channel, $n, 0.05)) {