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:
parent
650bf40a24
commit
7f49321e29
@ -459,7 +459,7 @@ sub cmd_factunset($self, $context) {
|
|||||||
if ($self->{pbot}->{factoids}->{data}->{storage}->exists($channel, $trigger, 'cap-override')) {
|
if ($self->{pbot}->{factoids}->{data}->{storage}->exists($channel, $trigger, 'cap-override')) {
|
||||||
if (lc $key eq 'locked') {
|
if (lc $key eq 'locked') {
|
||||||
if ($self->{pbot}->{capabilities}->userhas($userinfo, 'botowner')) {
|
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 {
|
} else {
|
||||||
return "You cannot unlock this factoid because it has a cap-override. Remove the override first.";
|
return "You cannot unlock this factoid because it has a cap-override. Remove the override first.";
|
||||||
}
|
}
|
||||||
|
@ -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 => 4837,
|
BUILD_REVISION => 4838,
|
||||||
BUILD_DATE => "2024-11-05",
|
BUILD_DATE => "2024-11-05",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user