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

Wait until connected before starting timer

This commit is contained in:
Pragmatic Software 2020-02-14 22:07:58 -08:00
parent 130f1ae81b
commit 7d2a746c2c

View File

@ -237,9 +237,6 @@ sub initialize {
# load available plugins
$self->{plugins}->autoload(%conf);
# start timer
$self->{timer}->start();
# give botowner all capabilities
$self->{capabilities}->rebuild_botowner_capabilities();
}
@ -282,7 +279,10 @@ sub connect {
$self->{connected} = 1;
#set up handlers for the IRC engine
# start timer once connected
$self->{timer}->start;
# set up handlers for the IRC engine
$self->{conn}->add_default_handler(sub { $self->{irchandlers}->default_handler(@_) }, 1);
$self->{conn}->add_handler([ 251,252,253,254,255,302 ], sub { $self->{irchandlers}->on_init(@_) });