Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Preventing disconnections of an IRC Bot made with Net::IRC

by zengargoyle (Deacon)
on Dec 07, 2003 at 11:31 UTC ( [id://312898]=note: print w/replies, xml ) Need Help??


in reply to Preventing disconnections of an IRC Bot made with Net::IRC

Untested, but try something like this.

my $timeout = 20; # seconds my $conn = $irc->newcon ( # ... ); sub check_alivedness { unless ( $conn->connected ) { # do something # $con->connect } $con->schedule( $timeout, \&check_alivedness ); } $con->schedule( $timeout, \&check_alivedness ); $irc->start;

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://312898]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (4)
As of 2024-04-24 18:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found