All pastes #2057308 Raw Edit

Mine

public text v1 · immutable
#2057308 ·published 2011-05-12 10:56 UTC
rendered paste body
on *:connect:{ 
  .startyline
}

alias startyline {
  .echo -s starting keep alive
  .hadd -m nets $network $+ $cid 0
  .timer $+ $network $+ $cid -o 0 30 yline
}

alias yline {
  if ($hget(nets,$network $+ $cid) == 1) { 
    .echo -s reconnecting to $server (PING TIMEOUT)
    ;.server $server 
  }
  else { 
    hadd -m nets $network $+ $cid 1
    .quote PING : $+ $ctime 
  }
}

on *:pong:{
  .hadd -m nets $network $+ $cid 0
  .halt
}