From 2f958ccf80f7ffd01a921d02fbcb393ed3906ddf Mon Sep 17 00:00:00 2001 From: Pragmatic Software Date: Wed, 22 Oct 2025 21:37:24 -0700 Subject: [PATCH] Plugin/RunCommand: add capability to botowner group on load --- lib/PBot/Plugin/RunCommand.pm | 4 ++++ lib/PBot/VERSION.pm | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/PBot/Plugin/RunCommand.pm b/lib/PBot/Plugin/RunCommand.pm index d3f8ae5c..f344c068 100644 --- a/lib/PBot/Plugin/RunCommand.pm +++ b/lib/PBot/Plugin/RunCommand.pm @@ -34,10 +34,14 @@ sub initialize($self, %conf) { requires_cap => 1, subref => sub { $self->cmd_runcmd(@_) }, ); + + # add capability to botowner group + $self->{pbot}->{capabilities}->add('botowner', 'can-runcmd', 1); } sub unload($self) { $self->{pbot}->{commands}->remove('runcmd'); + $self->{pbot}->{capabilities}->remove('can-runcmd'); } sub cmd_runcmd($self, $context) { diff --git a/lib/PBot/VERSION.pm b/lib/PBot/VERSION.pm index 580ac624..1237030a 100644 --- a/lib/PBot/VERSION.pm +++ b/lib/PBot/VERSION.pm @@ -25,7 +25,7 @@ use PBot::Imports; # These are set by the /misc/update_version script use constant { BUILD_NAME => "PBot", - BUILD_REVISION => 4920, + BUILD_REVISION => 4921, BUILD_DATE => "2025-10-22", };