mIRC Homepage
Posted By: Deep3D Ping - 11/05/05 01:40 PM
How can I make ctcp ping reply with e.g: 0.90 secs ??
Posted By: MikeChat Re: Ping - 11/05/05 03:04 PM
the default ping sends $ctime to whoever you are "pinging".
to get hundredths of a sec use $ticks
Make sure you replace any /ping aliases and any ctcp ping events to use $ticks.
Posted By: Deep3D Re: Ping - 12/05/05 09:05 PM
i don't get this bit** to work....

on 1:PING:ctcpreply $nick PING $ctime secs test test

help me? :tongue: :tongue:
Posted By: Hammer Re: Ping - 12/05/05 09:56 PM
Wrong event. on PING is to capture the PING? PONG! event (/help on PING). What you want is the on *:CTCPREPLY:PING *: event.

Code:
alias ping {
  if $show {
    echo -atic ctcp * Pinging $$1
  }
  .raw privmsg $$1 $+(:,$chr(1),PING $ticks,$chr(1))
}
on *:CTCPREPLY:PING *:{
  echo -atic ctcp * Ping response from $nick $+ : $round($calc(($ticks - $2) / 1000),2) seconds from $server
  .raw NOTICE $nick :Ping response from $nick $+ : $round($calc(($ticks - $2) / 1000),2) seconds from $server
  halt
}


cool
© mIRC Discussion Forums