3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-10-03 01:48:38 +02:00

Commands: support process-timeout metadata

This commit is contained in:
Pragmatic Software 2020-02-14 23:27:44 -08:00
parent 2de5653a74
commit a5435e03cb

View File

@ -122,7 +122,7 @@ sub interpreter {
$stuff->{no_nickoverride} = 1;
if ($self->get_meta($keyword, 'background-process')) {
my $timeout = $self->{pbot}->{registry}->get_value('processmanager', 'default_timeout');
my $timeout = $self->get_meta($keyword, 'process-timeout') // $self->{pbot}->{registry}->get_value('processmanager', 'default_timeout');
$self->{pbot}->{process_manager}->execute_process(
$stuff,
sub { $stuff->{result} = $ref->{subref}->($stuff->{from}, $stuff->{nick}, $stuff->{user}, $stuff->{host}, $stuff->{arguments}, $stuff) },