3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-11-25 21:39:27 +01:00

Plugins/AntiTwitter: disregard whitelisted users

This commit is contained in:
Pragmatic Software 2020-05-21 19:25:31 -07:00
parent beef46f120
commit 2af12c97f5

View File

@ -42,6 +42,9 @@ sub on_public {
$channel = lc $channel; $channel = lc $channel;
return 0 if not $self->{pbot}->{chanops}->can_gain_ops($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) { while ($msg =~ m/\B[@]([a-z0-9_^{}\-\\\[\]\|]+)/ig) {
my $n = $1; my $n = $1;
if ($self->{pbot}->{nicklist}->is_present_similar($channel, $n, 0.05)) { if ($self->{pbot}->{nicklist}->is_present_similar($channel, $n, 0.05)) {