3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-11-17 09:29:30 +01:00

Commands/Factoids: fix unsetting locked on factoids with cap-override

This commit is contained in:
Pragmatic Software 2024-11-05 16:55:53 -08:00
parent 650bf40a24
commit 7f49321e29
No known key found for this signature in database
GPG Key ID: CC916B6E3C84ECCE
2 changed files with 2 additions and 2 deletions

View File

@ -459,7 +459,7 @@ sub cmd_factunset($self, $context) {
if ($self->{pbot}->{factoids}->{data}->{storage}->exists($channel, $trigger, 'cap-override')) {
if (lc $key eq 'locked') {
if ($self->{pbot}->{capabilities}->userhas($userinfo, 'botowner')) {
$self->{pbot}->{factoids}->{data}->{storage}->unset($channel, $trigger, 'cap-override', 1);
$self->{pbot}->{factoids}->{data}->{storage}->unset($channel, $trigger, 'cap-override');
} else {
return "You cannot unlock this factoid because it has a cap-override. Remove the override first.";
}

View File

@ -25,7 +25,7 @@ use PBot::Imports;
# These are set by the /misc/update_version script
use constant {
BUILD_NAME => "PBot",
BUILD_REVISION => 4837,
BUILD_REVISION => 4838,
BUILD_DATE => "2024-11-05",
};