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
1 changed files with 2 additions and 0 deletions

View File

@ -43,6 +43,8 @@ sub on_public {
my $nosubs = $self->{pbot}->{registry}->get_value($channel, 'notyposub');
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 $event->{interpreted};