http://qs321.pair.com?node_id=396865


in reply to Net::IRC Connection times out

Hi Anonymous Monk.

IRC servers periodically send a 'PING' to clients that haven't been active for a period of time. In order to avoid a timeout, you need to send the response it is expecting (e.g. 'PONG').

Assuming you are reading from a socket and each line read is stored in a scalar named $input:
if ($input =~ /^PING(.*)$/i) { print $socket "PONG $1\r\n"; }


Hope this helps,
~Katie