mirror of
https://github.com/pragma-/pbot.git
synced 2025-01-23 02:24:25 +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)) {
|
if (not $self->{metadata}->exists($name)) {
|
||||||
$self->{metadata}->add($name, { level => $level, help => '' }, 1);
|
$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;
|
return $ref;
|
||||||
|
Loading…
Reference in New Issue
Block a user