factset: respect `locked` metadata

This commit is contained in:
Pragmatic Software 2019-05-27 19:40:24 -07:00
parent e72a964a01
commit 6f282d2968
1 changed files with 4 additions and 0 deletions

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.";