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

Expand factoid variables/selectors in arguments to code factoids

This commit is contained in:
Pragmatic Software 2021-11-05 13:08:45 -07:00
parent 1dae484e3f
commit 136460e6b4
2 changed files with 7 additions and 2 deletions

View File

@ -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 {

View File

@ -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 {}