mirror of
https://github.com/pragma-/pbot.git
synced 2025-11-13 21:17:30 +01:00
Plugin/RunCommand: add capability to botowner group on load
This commit is contained in:
parent
18f2c30f82
commit
2f958ccf80
@ -34,10 +34,14 @@ sub initialize($self, %conf) {
|
|||||||
requires_cap => 1,
|
requires_cap => 1,
|
||||||
subref => sub { $self->cmd_runcmd(@_) },
|
subref => sub { $self->cmd_runcmd(@_) },
|
||||||
);
|
);
|
||||||
|
|
||||||
|
# add capability to botowner group
|
||||||
|
$self->{pbot}->{capabilities}->add('botowner', 'can-runcmd', 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
sub unload($self) {
|
sub unload($self) {
|
||||||
$self->{pbot}->{commands}->remove('runcmd');
|
$self->{pbot}->{commands}->remove('runcmd');
|
||||||
|
$self->{pbot}->{capabilities}->remove('can-runcmd');
|
||||||
}
|
}
|
||||||
|
|
||||||
sub cmd_runcmd($self, $context) {
|
sub cmd_runcmd($self, $context) {
|
||||||
|
|||||||
@ -25,7 +25,7 @@ use PBot::Imports;
|
|||||||
# These are set by the /misc/update_version script
|
# These are set by the /misc/update_version script
|
||||||
use constant {
|
use constant {
|
||||||
BUILD_NAME => "PBot",
|
BUILD_NAME => "PBot",
|
||||||
BUILD_REVISION => 4920,
|
BUILD_REVISION => 4921,
|
||||||
BUILD_DATE => "2025-10-22",
|
BUILD_DATE => "2025-10-22",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user