diff --git a/lib/PBot/Core/Factoids/Code.pm b/lib/PBot/Core/Factoids/Code.pm index 27f3b887..9e23a270 100644 --- a/lib/PBot/Core/Factoids/Code.pm +++ b/lib/PBot/Core/Factoids/Code.pm @@ -33,8 +33,13 @@ sub execute { my $variables = $self->{pbot}->{factoids}->{variables}; + # expand factoid variables/selectors/etc in code $context->{code} = $variables->expand_factoid_vars($context, $context->{code}); + # expand factoid variables/selectors/etc in arguments + $context->{arguments} = $variables->expand_factoid_vars($context, $context->{arguments}); + + # expand factoid action $args if ($factoids->get_data($context->{channel}, $context->{keyword}, 'allow_empty_args')) { $context->{code} = $variables->expand_action_arguments($context->{code}, $context->{arguments}, ''); } else { diff --git a/lib/PBot/VERSION.pm b/lib/PBot/VERSION.pm index 49db0c5e..697606fc 100644 --- a/lib/PBot/VERSION.pm +++ b/lib/PBot/VERSION.pm @@ -25,8 +25,8 @@ use PBot::Imports; # These are set by the /misc/update_version script use constant { BUILD_NAME => "PBot", - BUILD_REVISION => 4415, - BUILD_DATE => "2021-10-19", + BUILD_REVISION => 4417, + BUILD_DATE => "2021-11-05", }; sub initialize {}