3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-11-23 04:19:27 +01: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; $stuff->{no_nickoverride} = 1;
if ($self->get_meta($keyword, 'background-process')) { 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( $self->{pbot}->{process_manager}->execute_process(
$stuff, $stuff,
sub { $stuff->{result} = $ref->{subref}->($stuff->{from}, $stuff->{nick}, $stuff->{user}, $stuff->{host}, $stuff->{arguments}, $stuff) }, sub { $stuff->{result} = $ref->{subref}->($stuff->{from}, $stuff->{nick}, $stuff->{user}, $stuff->{host}, $stuff->{arguments}, $stuff) },