3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-12-27 13:12:42 +01:00

BanList: use save queue to prevent repeated saves when handling multiple bans

This commit is contained in:
Pragmatic Software 2020-05-14 16:58:29 -07:00
parent 506ebf13c6
commit 4166da140e

View File

@ -43,13 +43,15 @@ sub initialize {
$self->{banlist} = PBot::DualIndexHashObject->new(
pbot => $self->{pbot},
name => 'Ban List',
filename => $self->{pbot}->{registry}->get_value('general', 'data_dir') . '/banlist'
filename => $self->{pbot}->{registry}->get_value('general', 'data_dir') . '/banlist',
save_queue_timeout => 5,
);
$self->{quietlist} = PBot::DualIndexHashObject->new(
pbot => $self->{pbot},
name => 'Quiet List',
filename => $self->{pbot}->{registry}->get_value('general', 'data_dir') . '/quietlist'
filename => $self->{pbot}->{registry}->get_value('general', 'data_dir') . '/quietlist',
save_queue_timeout => 5,
);
$self->{banlist}->load;