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:
parent
6eeec3b26c
commit
727d086df1
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user