3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-11-23 04:19:27 +01:00

Plugins/Plang: fix double printing

This commit is contained in:
Pragmatic Software 2020-07-13 19:32:00 -07:00
parent 919a11a2fb
commit 7698531397
2 changed files with 6 additions and 2 deletions

2
Plang

@ -1 +1 @@
Subproject commit df6f6a11f5bd545e77774b2a883a9f7f5c7229fe
Subproject commit b1dc703205270a0471a86374f96f128cfb947bb7

View File

@ -104,7 +104,11 @@ sub run {
if ($ins eq 'STMT') {
$result = $self->{plang}->{interpreter}->statement($context, $node->[1]);
$self->{output} .= $result->[1] if $result->[0] eq 'STDOUT';
if ($result->[0] eq 'STDOUT') {
$self->{output} .= $result->[1];
$result = undef;
next;
}
if ($result->[0] eq 'ERROR') {
$self->{output} .= "Error: $result->[1]";