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

Add optional #channel.interpolate_factoids registry setting

This commit is contained in:
Pragmatic Software 2021-05-28 09:45:18 -07:00
parent 4f5174a1ca
commit 146d9b67a9
2 changed files with 4 additions and 0 deletions

View File

@ -748,6 +748,9 @@ sub expand_factoid_vars {
my $interpolate = $self->{factoids}->get_data($context->{channel}, $context->{keyword}, 'interpolate');
return $action if defined $interpolate and $interpolate == 0;
$interpolate = $self->{pbot}->{registry}->get_value($context->{channel}, 'interpolate_factoids');
return $action if defined $interpolate and $interpolate == 0;
$action = $self->expand_factoid_selectors($context, $action, %opts);
my $depth = 0;

View File

@ -248,3 +248,4 @@ Name | Description
[channel].strictnamespace | When enabled, factoids belonging to other channels will not show up in this channel unless specifically invoked.
[channel].trigger | Overrides the bot trigger for this channel.
[channel].typosub_ignore_commands | Do not apply `s//` substitution to bot commands.
[channel].interpolate_factoids | If this key exists and is set to `0` then factoids containing `$variables` will not have the variables expanded and interpolated.