mirror of
https://github.com/pragma-/pbot.git
synced 2024-11-22 20:09:43 +01:00
Give sensible names to various existing timers
This commit is contained in:
parent
e98072f98d
commit
16ac6d95fb
@ -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);
|
||||||
|
|
||||||
|
@ -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 {
|
||||||
|
@ -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 {
|
||||||
|
@ -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 {
|
||||||
|
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user