mirror of
https://github.com/pragma-/pbot.git
synced 2024-11-29 23:39:24 +01:00
Plugins/Plang: Output final String value as string literal
This commit is contained in:
parent
29d7582be7
commit
7441f42967
@ -82,7 +82,13 @@ sub cmd_plang {
|
|||||||
my $result = $self->{plang}->interpret_string($context->{arguments});
|
my $result = $self->{plang}->interpret_string($context->{arguments});
|
||||||
|
|
||||||
# check to see if we need to append final result to output
|
# check to see if we need to append final result to output
|
||||||
$self->{output} .= $self->{plang}->{interpreter}->output_value($result) if defined $result->[1];
|
if (defined $result->[1]) {
|
||||||
|
if ($result->[0] eq 'STRING') {
|
||||||
|
$self->{output} .= $self->{plang}->{interpreter}->output_string_literal($result->[1]);
|
||||||
|
} else {
|
||||||
|
$self->{output} .= $self->{plang}->{interpreter}->output_value($result);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
# return the output
|
# return the output
|
||||||
return length $self->{output} ? $self->{output} : "No output.";
|
return length $self->{output} ? $self->{output} : "No output.";
|
||||||
|
Loading…
Reference in New Issue
Block a user