All pastes #427295 Raw Edit

Anonymous

public text v1 · immutable
·published 2007-04-06 18:38 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
}