3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-11-23 04:19:27 +01:00

ProcessManager: properly add "can-kill" cap without triggering saving

This commit is contained in:
Pragmatic Software 2020-03-06 13:29:37 -08:00
parent 16ac6d95fb
commit 74b3f35d3e

View File

@ -24,7 +24,7 @@ sub initialize {
my ($self, %conf) = @_; my ($self, %conf) = @_;
$self->{pbot}->{commands}->register(sub { $self->ps_cmd(@_) }, 'ps', 0); $self->{pbot}->{commands}->register(sub { $self->ps_cmd(@_) }, 'ps', 0);
$self->{pbot}->{commands}->register(sub { $self->kill_cmd(@_) }, 'kill', 1); $self->{pbot}->{commands}->register(sub { $self->kill_cmd(@_) }, 'kill', 1);
$self->{pbot}->{capabilities}->add('admin', 'can-kill'); $self->{pbot}->{capabilities}->add('admin', 'can-kill', 1);
$self->{processes} = {}; $self->{processes} = {};
# automatically reap children processes in background # automatically reap children processes in background