mirror of
https://github.com/pragma-/pbot.git
synced 2024-12-24 11:42:35 +01:00
Fix dead argument in pipe
This commit is contained in:
parent
4d99f1655c
commit
fc6e0759d3
@ -249,6 +249,8 @@ sub interpret {
|
||||
$self->{pbot}->{logger}->log("Truncating keyword to 30 chars: $keyword\n");
|
||||
}
|
||||
|
||||
my $got_pipe = 0;
|
||||
|
||||
if (defined $arguments && $arguments =~ m/\|\s*\{\s*[^}]+\}\s*$/) {
|
||||
$arguments =~ m/(.*?)\s*\|\s*\{\s*([^}]+)\}(.*)/;
|
||||
my ($args, $pipe, $rest) = ($1, $2, $3);
|
||||
@ -259,6 +261,7 @@ sub interpret {
|
||||
$stuff->{arguments} = $args;
|
||||
$stuff->{pipe} = $pipe;
|
||||
$stuff->{pipe_rest} = $rest;
|
||||
$got_pipe = 1;
|
||||
}
|
||||
|
||||
$stuff->{nickoverride} = $stuff->{nick} if defined $stuff->{nickoverride} and $stuff->{nickoverride} eq 'me';
|
||||
@ -295,7 +298,7 @@ sub interpret {
|
||||
$stuff->{root_keyword} = $keyword;
|
||||
}
|
||||
|
||||
$stuff->{arguments} = $arguments unless exists $stuff->{pipe};
|
||||
$stuff->{arguments} = $arguments unless $got_pipe;
|
||||
|
||||
return $self->SUPER::execute_all($stuff);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user