As a side note to all this ping calculation, here's how I do miliseconds:
1) standard ping request comes in (ctcp my-nick ping)
2) using the script:
ctcp ^*:*: {
elseif ($1 == ping) {
if ($nick != $me) {
custom reply code snipped
if ($calc(($2 - $ctime)/1000) >= 0) { var %pt = $calc(($2 - $ctime)/1000) | goto display }
if ($calc(($ctime - $2)/1000) >= 0) { var %pt = $calc(($ctime - $2)/1000) | goto display }
:display
rest of script
}
}
}
I KNOW it could be done differently, but it works well by intercepting the $ctime value placed on $2 and just manipulates that vs using $ticks