3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-11-26 22:09:26 +01:00

Give sensible names to various existing timers

This commit is contained in:
Pragmatic Software 2020-03-06 13:28:06 -08:00
parent e98072f98d
commit 16ac6d95fb
5 changed files with 7 additions and 7 deletions

View File

@ -41,7 +41,7 @@ sub initialize {
$self->{'ban-exemptions'} = PBot::DualIndexHashObject->new(name => 'Ban exemptions', filename => $filename, pbot => $self->{pbot}); $self->{'ban-exemptions'} = PBot::DualIndexHashObject->new(name => 'Ban exemptions', filename => $filename, pbot => $self->{pbot});
$self->{'ban-exemptions'}->load; $self->{'ban-exemptions'}->load;
$self->{pbot}->{timer}->register(sub { $self->adjust_offenses }, 60 * 60 * 1); $self->{pbot}->{timer}->register(sub { $self->adjust_offenses }, 60 * 60 * 1, 'AntiFlood Adjust Offenses');
$self->{pbot}->{registry}->add_default('text', 'antiflood', 'enforce', $conf{enforce_antiflood} // 1); $self->{pbot}->{registry}->add_default('text', 'antiflood', 'enforce', $conf{enforce_antiflood} // 1);

View File

@ -48,10 +48,10 @@ sub initialize {
$self->{pbot}->{registry}->add_default('text', 'general', 'deop_timeout', 300); $self->{pbot}->{registry}->add_default('text', 'general', 'deop_timeout', 300);
$self->{pbot}->{timer}->register(sub { $self->check_opped_timeouts }, 10);
$self->{pbot}->{timer}->register(sub { $self->check_unban_timeouts }, 10); $self->{pbot}->{timer}->register(sub { $self->check_unban_timeouts }, 10);
$self->{pbot}->{timer}->register(sub { $self->check_unmute_timeouts }, 10); $self->{pbot}->{timer}->register(sub { $self->check_unmute_timeouts }, 10);
$self->{pbot}->{timer}->register(sub { $self->check_unban_queue }, 30); $self->{pbot}->{timer}->register(sub { $self->check_opped_timeouts }, 10, 'Check Opped Timeouts');
$self->{pbot}->{timer}->register(sub { $self->check_unban_queue }, 30, 'Check Unban Queue');
} }
sub can_gain_ops { sub can_gain_ops {

View File

@ -49,7 +49,7 @@ sub initialize {
$self->{pbot}->{event_dispatcher}->register_handler('pbot.join', sub { $self->on_self_join(@_) }); $self->{pbot}->{event_dispatcher}->register_handler('pbot.join', sub { $self->on_self_join(@_) });
$self->{pbot}->{event_dispatcher}->register_handler('pbot.part', sub { $self->on_self_part(@_) }); $self->{pbot}->{event_dispatcher}->register_handler('pbot.part', sub { $self->on_self_part(@_) });
$self->{pbot}->{timer}->register(sub { $self->check_pending_whos }, 10); $self->{pbot}->{timer}->register(sub { $self->check_pending_whos }, 10, 'Check Pending Whos');
} }
sub default_handler { sub default_handler {

View File

@ -40,7 +40,7 @@ sub initialize {
$self->{pbot}->{timer}->register( $self->{pbot}->{timer}->register(
sub { $self->send_ping }, sub { $self->send_ping },
$self->{pbot}->{registry}->get_value('lagchecker', 'lag_history_interval'), $self->{pbot}->{registry}->get_value('lagchecker', 'lag_history_interval'),
'lag_history_interval' 'lag check'
); );
$self->{pbot}->{commands}->register(sub { $self->lagcheck(@_) }, "lagcheck", 0); $self->{pbot}->{commands}->register(sub { $self->lagcheck(@_) }, "lagcheck", 0);
@ -49,7 +49,7 @@ sub initialize {
sub lag_history_interval_trigger { sub lag_history_interval_trigger {
my ($self, $section, $item, $newvalue) = @_; my ($self, $section, $item, $newvalue) = @_;
$self->{pbot}->{timer}->update_interval('lag_history_interval', $newvalue); $self->{pbot}->{timer}->update_interval('lag check', $newvalue);
} }
sub send_ping { sub send_ping {

View File

@ -148,7 +148,7 @@ sub initialize {
$self->{logger}->log("module_dir: $module_dir\n"); $self->{logger}->log("module_dir: $module_dir\n");
$self->{logger}->log("plugin_dir: $plugin_dir\n"); $self->{logger}->log("plugin_dir: $plugin_dir\n");
$self->{timer} = PBot::Timer->new(pbot => $self, timeout => 10, %conf); $self->{timer} = PBot::Timer->new(pbot => $self, timeout => 10, name => 'PBot Timer', %conf);
$self->{modules} = PBot::Modules->new(pbot => $self, %conf); $self->{modules} = PBot::Modules->new(pbot => $self, %conf);
$self->{functions} = PBot::Functions->new(pbot => $self, %conf); $self->{functions} = PBot::Functions->new(pbot => $self, %conf);
$self->{refresher} = PBot::Refresher->new(pbot => $self); $self->{refresher} = PBot::Refresher->new(pbot => $self);