mirror of
https://github.com/pragma-/pbot.git
synced 2025-01-12 04:52:37 +01:00
Interpreter: minor formatting clean-up
This commit is contained in:
parent
da43217d3e
commit
bd04feda81
@ -267,8 +267,12 @@ sub interpret {
|
|||||||
$arguments =~ s/\s*(?<!\\)\|\s*{(\Q$pipe\E)}.*$//s;
|
$arguments =~ s/\s*(?<!\\)\|\s*{(\Q$pipe\E)}.*$//s;
|
||||||
$pipe =~ s/^\s+|\s+$//g;
|
$pipe =~ s/^\s+|\s+$//g;
|
||||||
|
|
||||||
if (exists $context->{pipe}) { $context->{pipe_rest} = "$rest | { $context->{pipe} }$context->{pipe_rest}"; }
|
if (exists $context->{pipe}) {
|
||||||
else { $context->{pipe_rest} = $rest; }
|
$context->{pipe_rest} = "$rest | { $context->{pipe} }$context->{pipe_rest}";
|
||||||
|
} else {
|
||||||
|
$context->{pipe_rest} = $rest;
|
||||||
|
}
|
||||||
|
|
||||||
$context->{pipe} = $pipe;
|
$context->{pipe} = $pipe;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -793,7 +797,7 @@ sub handle_result {
|
|||||||
if ($result =~ s#^(/say|/me) ##) { $context->{prepend} = $1; }
|
if ($result =~ s#^(/say|/me) ##) { $context->{prepend} = $1; }
|
||||||
elsif ($result =~ s#^(/msg \S+) ##) { $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});
|
my ($pipe, $pipe_rest) = (delete $context->{pipe}, delete $context->{pipe_rest});
|
||||||
if (not $context->{alldone}) {
|
if (not $context->{alldone}) {
|
||||||
$context->{command} = "$pipe $result $pipe_rest";
|
$context->{command} = "$pipe $result $pipe_rest";
|
||||||
|
Loading…
Reference in New Issue
Block a user