3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-12-24 11:42:35 +01:00

Interpreter: minor formatting clean-up

This commit is contained in:
Pragmatic Software 2020-06-20 20:52:54 -07:00
parent da43217d3e
commit bd04feda81

View File

@ -267,8 +267,12 @@ sub interpret {
$arguments =~ s/\s*(?<!\\)\|\s*{(\Q$pipe\E)}.*$//s;
$pipe =~ s/^\s+|\s+$//g;
if (exists $context->{pipe}) { $context->{pipe_rest} = "$rest | { $context->{pipe} }$context->{pipe_rest}"; }
else { $context->{pipe_rest} = $rest; }
if (exists $context->{pipe}) {
$context->{pipe_rest} = "$rest | { $context->{pipe} }$context->{pipe_rest}";
} else {
$context->{pipe_rest} = $rest;
}
$context->{pipe} = $pipe;
}
@ -793,7 +797,7 @@ sub handle_result {
if ($result =~ s#^(/say|/me) ##) { $context->{prepend} = $1; }
elsif ($result =~ s#^(/msg \S+) ##) { $context->{prepend} = $1; }
if ($context->{pipe}) {
if (exists $context->{pipe}) {
my ($pipe, $pipe_rest) = (delete $context->{pipe}, delete $context->{pipe_rest});
if (not $context->{alldone}) {
$context->{command} = "$pipe $result $pipe_rest";