mirror of
https://github.com/pragma-/pbot.git
synced 2024-11-19 10:29:30 +01:00
Factoids: Fix undo/redo via DualIndexSQLiteObject
This commit is contained in:
parent
f0300f873a
commit
cac4ac81ad
@ -501,8 +501,10 @@ sub get_data {
|
||||
my $d = {};
|
||||
foreach my $key (keys %{$stuff->[0]}) {
|
||||
next if $key eq 'index1' or $key eq 'index2';
|
||||
$self->{cache}->{$lc_index1}->{$lc_index2}->{$key} = $stuff->[0]->{$key};
|
||||
$d->{$key} = $stuff->[0]->{key} if defined $stuff->[0]->{key};
|
||||
if (defined $stuff->[0]->{$key}) {
|
||||
$self->{cache}->{$lc_index1}->{$lc_index2}->{$key} = $stuff->[0]->{$key};
|
||||
$d->{$key} = $stuff->[0]->{$key};
|
||||
}
|
||||
}
|
||||
|
||||
my $timeout = $self->{pbot}->{registry}->get_value('dualindexsqliteobject', 'cache_timeout') // 60 * 30;
|
||||
|
@ -130,8 +130,8 @@ sub add_factoid {
|
||||
};
|
||||
}
|
||||
|
||||
$self->{commands}->log_factoid($channel, $trigger, $owner, "created: $action") unless $dont_save;
|
||||
$self->{factoids}->add($channel, $trigger, $data, $dont_save);
|
||||
$self->{commands}->log_factoid($channel, $trigger, $owner, "created: $action") unless $dont_save;
|
||||
}
|
||||
|
||||
sub remove_factoid {
|
||||
|
Loading…
Reference in New Issue
Block a user