diff --git a/PBot/Factoids.pm b/PBot/Factoids.pm index ea937d44..6d47bdc5 100644 --- a/PBot/Factoids.pm +++ b/PBot/Factoids.pm @@ -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; diff --git a/doc/Registry.md b/doc/Registry.md index 9b60da5e..a11f420e 100644 --- a/doc/Registry.md +++ b/doc/Registry.md @@ -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.