my $self = $heap->{ "self" };
if( ! $heap->{ 'ircobject' }->connected() ) {
print "IRC : Connection was lost.. reconnecting.\n";
+ $heap->{ "watchdog" } *= 2;
$kernel->post( $heap->{ 'ircobject' }->session_id(), "connect", {
Nick => $self->{ "nick" },
Username => "Destult2",
if( $heap->{ 'timer' } == 60 ) {
$kernel->post( $heap->{ 'ircobject' }->session_id(), "version" );
}
- $kernel->delay_set( "watchdog", 5 );
+ $kernel->delay_set( "watchdog", $heap->{ "watchdog" } );
}
sub on_start {
Server => $self->{ "host" },
Port => $self->{ "port" },
} );
+ $heap->{ "watchdog" } = 5;
$kernel->delay_set( "watchdog", 5 );
print( "IRC : Started.\n" );
}
print( "IRC : Attempting to register with nickserv.\n" );
$_[KERNEL]->post( $heap->{ 'ircobject' }->session_id(), "privmsg", "nickserv", "identify ".$self->{ "password" } );
}
+ $heap->{ "watchdog" } = 5;
print( "IRC : Connected to irc://".$self->{ "host" }."/".$self->{ "channel" }."\n" );
for my $chan (split( /,/, $self->{ "channel" } )) {
my @args = split( /:/, $chan );