mIRC Homepage

PING reply to ms

Posted By: synth7

PING reply to ms - 04/11/05 02:41 AM

How can I convert my ctcp PING reply to others from seconds to milliseconds?
Posted By: FiberOPtics

Re: PING reply to ms - 04/11/05 02:56 AM

This is an example of what you could do:

; Usage: /ping <nick>

Code:
alias ping set -u100 %ping $+ $$1 $ticks | ctcp $1 ping
[color:red]  [/color] 
on *:ctcpreply:ping *:{
  if ($($+(%,ping,$nick),2)) {
    haltdef
    echo -atc ctcp [ $+ $nick PING reply]: $calc(($ticks - $v1)/1000) $+ secs
    unset %ping [ $+ [ $nick ] ]
  }
}
Posted By: MikeChat

Re: PING reply to ms - 04/11/05 05:50 AM

slightly different is this one, I got it from the board here before the fire
I wish I could remember who posted it..
Code:
alias ping .raw PRIVMSG $$1 : $+ $chr(1) $+ PING $ticks $+ $chr(1)
on *:CTCPREPLY:PING*: {
  var %ping = $calc(($ticks - $2) / 1000) Seconds
  echo -a $+($nick,'s) $1 is %ping
  .notice $nick Your $1 is %ping
  haltdef
}

make sure you dont have another "ping" alias anywhere
Posted By: FiberOPtics

Re: PING reply to ms - 11/12/05 06:33 PM

That is indeed another alternative, but I would do a check for existance of parameter $2, because if you did a ping with /ctcp <nick> ping, it will not show correct results.
© 2019 mIRC Discussion Forums