Impossible to get it work...
when some1 pings you they send you the uptime of their computer, then you send that information back to them, when the "ping" arrives back to the sender they do calc uptime - uptime_when_ping_sent ie.
Sender uptime = 1234 secs
Sender->Reciever: ping 1234
<some amount of time>
Sender uptime = 1244 secs
Reciever gets the ping 1234
Reciever->Sender pingreply 1234
<some amount of time>
Sender uptime = 1255 secs
Sender recieves pingreply 1234 and does calculating 1255-1234=21 secs
of course if sender stores the uptime when they send ping and then does the calculating with that when they recieve pingreply
only way to get working what you want is something along these lines:
on *:text:!ping:#channel: {
ctcp $nick $ticks
set %ping.nick $nick
set %ping.chan $chan
enable #ping.catch
}
#ping.catch off
on *:ctcpreply:ping *:?: {
if ( $nick = %ping.nick ) {
msg %ping.chan Ping between $nick and $me is $calc(($ticks - $2)/1000) secs.
unset %ping.*
disable #ping.catch
halt
}
}
#ping.catch end
nothing tested... but it should work...