3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-12-23 19:22:40 +01:00

factset: respect locked metadata

This commit is contained in:
Pragmatic Software 2019-05-27 19:40:24 -07:00
parent e72a964a01
commit 6f282d2968

View File

@ -555,6 +555,10 @@ sub factset {
}
}
if (defined $value and !$level and $self->{pbot}->{factoids}->{factoids}->hash->{$channel}->{$trigger}->{'locked'}) {
return "/say $trigger is locked; unlock before setting.";
}
if (lc $key eq 'effective-level' and defined $value and $level > 0) {
if ($value > $level) {
return "You cannot set `effective-level` greater than your level, which is $level.";