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

Plugins/TypoSub: users can set no-typosub to exclude themselves from s/// invocation

This commit is contained in:
Pragmatic Software 2020-07-08 14:48:30 -07:00
parent fc648c3351
commit 9e362725ce

View File

@ -43,6 +43,8 @@ sub on_public {
my $nosubs = $self->{pbot}->{registry}->get_value($channel, 'notyposub'); my $nosubs = $self->{pbot}->{registry}->get_value($channel, 'notyposub');
return 0 if defined $nosubs and $nosubs; return 0 if defined $nosubs and $nosubs;
return 0 if $self->{pbot}->{users}->get_loggedin_user_metadata($channel, "$nick!$user\@$host", 'no-typosub');
return 0 if $channel !~ m/^#/; return 0 if $channel !~ m/^#/;
return 0 if $event->{interpreted}; return 0 if $event->{interpreted};