mirror of
https://github.com/pragma-/pbot.git
synced 2025-01-11 12:32:37 +01:00
Commands: add set_meta function
This commit is contained in:
parent
164e4d94ae
commit
0af8fc4c5c
@ -131,6 +131,15 @@ sub interpreter {
|
||||
return undef;
|
||||
}
|
||||
|
||||
sub set_meta {
|
||||
my ($self, $command, $key, $value, $save) = @_;
|
||||
$command = lc $command;
|
||||
return undef if not exists $self->{metadata}->{hash}->{$command};
|
||||
$self->{metadata}->{hash}->{$command}->{$key} = $value;
|
||||
$self->save_metadata if $save;
|
||||
return 1;
|
||||
}
|
||||
|
||||
sub get_meta {
|
||||
my ($self, $command, $key) = @_;
|
||||
$command = lc $command;
|
||||
|
Loading…
Reference in New Issue
Block a user