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

Commands: ensure "level" metadata is always set

This commit is contained in:
Pragmatic Software 2020-01-18 22:13:08 -08:00
parent 6eeec3b26c
commit 727d086df1

View File

@ -55,6 +55,10 @@ sub register {
if (not $self->{metadata}->exists($name)) {
$self->{metadata}->add($name, { level => $level, help => '' }, 1);
} else {
if (not defined $self->get_meta($name, 'level')) {
$self->{metadata}->set($name, 'level', $level, 1);
}
}
return $ref;