mirror of
https://github.com/pragma-/pbot.git
synced 2024-12-23 19:22:40 +01:00
ProcessManager: show "No output." for processes that exit without output; add $context flag to suppress this
This commit is contained in:
parent
ba3b22d124
commit
2dfae83478
@ -232,7 +232,8 @@ sub process_pipe_reader {
|
||||
|
||||
if (not defined $context->{result} or not length $context->{result}) {
|
||||
$self->{pbot}->{logger}->log("No result from process.\n");
|
||||
return;
|
||||
return if $context->{suppress_no_output};
|
||||
$context->{result} = "No output.";
|
||||
}
|
||||
|
||||
if ($context->{referenced}) { return if $context->{result} =~ m/(?:no results)/i; }
|
||||
|
@ -65,9 +65,16 @@ sub show_url_titles {
|
||||
}
|
||||
|
||||
my $context = {
|
||||
from => $channel, nick => $nick, user => $user, host => $host,
|
||||
command => "title $nick $url", root_channel => $channel, root_keyword => "title",
|
||||
keyword => "title", arguments => "$nick $url"
|
||||
from => $channel,
|
||||
nick => $nick,
|
||||
user => $user,
|
||||
host => $host,
|
||||
command => "title $nick $url",
|
||||
root_channel => $channel,
|
||||
root_keyword => "title",
|
||||
keyword => "title",
|
||||
arguments => "$nick $url",
|
||||
suppress_no_output => 1,
|
||||
};
|
||||
|
||||
$self->{pbot}->{modules}->execute_module($context);
|
||||
|
Loading…
Reference in New Issue
Block a user