From 17f5b92a8fd136e46342005c0aabcc07c14af3b9 Mon Sep 17 00:00:00 2001 From: Pragmatic Software Date: Wed, 22 May 2019 23:12:31 -0700 Subject: [PATCH] Factoids: use correct arguments when calling alias --- PBot/Factoids.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/PBot/Factoids.pm b/PBot/Factoids.pm index f899d691..837c1409 100644 --- a/PBot/Factoids.pm +++ b/PBot/Factoids.pm @@ -1005,7 +1005,9 @@ sub handle_action { if ($action =~ /^\/call\s+(.*)$/) { my $command = $1; unless ($self->{factoids}->hash->{$channel}->{$keyword}->{'require_explicit_args'}) { - $command .= " $stuff->{original_arguments}" if length $stuff->{original_arguments} and not $stuff->{aliased} and not $stuff->{special} eq 'code-factoid'; + my $args = $stuff->{original_arguments}; + $args = $stuff->{arguments} if exists $stuff->{arguments}; + $command .= " $args" if length $args and not $stuff->{aliased} and not $stuff->{special} eq 'code-factoid'; } if ($command =~ s/\s*--keyword-override=([^ ]+)\s*//) {