mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jan 2003
Posts: 127
L
Vogon poet
OP Offline
Vogon poet
L
Joined: Jan 2003
Posts: 127
as above?

Joined: Jan 2003
Posts: 18
P
Pikka bird
Offline
Pikka bird
P
Joined: Jan 2003
Posts: 18
a ping time from where, exactly, server of another user, either way use that of /ping nickname/server $ctime, and when you get your pong/ping reply, calcuate the difference between the response and your current $ctime, yet.. another way would to be use that of $ticks in sending/working out

Joined: Jan 2003
Posts: 127
L
Vogon poet
OP Offline
Vogon poet
L
Joined: Jan 2003
Posts: 127
I wanted to ping a user and get the response in milliseconds. How to do that?

Joined: Dec 2002
Posts: 3,138
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,138
Here is my method:
Code:
on *:CTCPREPLY:ping *:{
  echo $color(ctcp) -at [ $+ $nick $1 reply]: $calc($ticks - $2) ms
  haltdef
}
alias ctcp {
  if ( $2 == ping ) {
    echo $color(ctcp) -at -> $chr(91) $+ $1 $+ $chr(93) PING
    .msg $1 PING $ticks $+ 
  }
  else { !ctcp $1- }
}


Link Copied to Clipboard