mirror of
https://github.com/pragma-/pbot.git
synced 2024-11-22 03:49:29 +01:00
pbot-vm: Add newline to output only if output does not already have a newline
This commit is contained in:
parent
3375580a2d
commit
690c5f5c44
@ -116,7 +116,10 @@ sub process_command($command, $mod, $user, $tag) {
|
||||
|
||||
print STDERR "=" x 40, "\n";
|
||||
|
||||
return "$result\n";
|
||||
# ensure output is newline-terminated
|
||||
$result .= "\n" unless $result =~ /\n$/;
|
||||
|
||||
return $result;
|
||||
} else {
|
||||
# wait for child to finish
|
||||
waitpid($pid, 0);
|
||||
|
Loading…
Reference in New Issue
Block a user