From 73741e54180d6e9098c057f774cd382c7690b53c Mon Sep 17 00:00:00 2001 From: Pragmatic Software Date: Thu, 9 May 2019 21:04:28 -0700 Subject: [PATCH] code-factoids: handle arguments a little better --- PBot/Factoids.pm | 2 +- PBot/Interpreter.pm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/PBot/Factoids.pm b/PBot/Factoids.pm index dde77c50..0dd92ff3 100644 --- a/PBot/Factoids.pm +++ b/PBot/Factoids.pm @@ -998,7 +998,7 @@ sub handle_action { # Check if it's an alias if ($action =~ /^\/call\s+(.*)$/) { my $command = $1; - $command .= " $stuff->{original_arguments}" if length $stuff->{original_arguments} and not $stuff->{aliased}; + $command .= " $stuff->{original_arguments}" if length $stuff->{original_arguments} and not $stuff->{aliased} and not $stuff->{special} eq 'code-factoid'; if ($command =~ s/\s*--keyword-override=([^ ]+)\s*//) { $stuff->{keyword_override} = $1; diff --git a/PBot/Interpreter.pm b/PBot/Interpreter.pm index b78a28ea..b54ef337 100644 --- a/PBot/Interpreter.pm +++ b/PBot/Interpreter.pm @@ -202,7 +202,7 @@ sub interpret { $pbot->{logger}->log("=== Enter interpret_command: [" . (defined $stuff->{from} ? $stuff->{from} : "(undef)") . "][$stuff->{nick}!$stuff->{user}\@$stuff->{host}][$stuff->{interpret_depth}][$stuff->{command}]\n"); - $stuff->{special} = ""; + $stuff->{special} = "" unless exists $self->{special}; if ($self->{pbot}->{registry}->get_value('general', 'debugcontext')) { use Data::Dumper;