mirror of
https://github.com/pragma-/pbot.git
synced 2024-12-25 04:02:37 +01:00
Factoids: add get_meta()
This commit is contained in:
parent
4327f13bef
commit
224ace9e80
@ -71,6 +71,15 @@ sub save_factoids {
|
|||||||
$self->export_factoids;
|
$self->export_factoids;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sub get_meta {
|
||||||
|
my ($self, $channel, $trigger, $key) = @_;
|
||||||
|
$channel = lc $channel;
|
||||||
|
$trigger = lc $trigger;
|
||||||
|
my ($chan, $trig) = $self->find_factoid($channel, $trigger, exact_channel => 1);
|
||||||
|
return undef if not defined $chan;
|
||||||
|
return $self->{factoids}->{hash}->{$chan}->{$trig}->{$key};
|
||||||
|
}
|
||||||
|
|
||||||
sub add_factoid {
|
sub add_factoid {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
my ($type, $channel, $owner, $trigger, $action, $dont_save) = @_;
|
my ($type, $channel, $owner, $trigger, $action, $dont_save) = @_;
|
||||||
|
Loading…
Reference in New Issue
Block a user