3
0
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:
Pragmatic Software 2025-10-22 21:37:24 -07:00
parent 18f2c30f82
commit 2f958ccf80
No known key found for this signature in database
GPG Key ID: CC916B6E3C84ECCE
2 changed files with 5 additions and 1 deletions

View File

@ -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) {

View File

@ -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",
}; };