Use this:
Code:
on 1:connect:.timer 0 70 lag
on 1:pong:{
  if ($2- isnum) {
    var %l = $calc(($ticks - $2-) / 1000)
    if (%l >= 0) { echo 4 -s Got answer from server: %l seconds lag. }
  }
}
alias lag .quote PING $ticks

Just that this code will fill your status with Got answer from server... blahblah
If you want to hide that, use this code:
Code:
on 1:connect:.raw ping : $+ $ticks

That's all smile