mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jan 2003
Posts: 48
O
oSaYaP Offline OP
Ameglian cow
OP Offline
Ameglian cow
O
Joined: Jan 2003
Posts: 48
I need this:
on 1:text:*!pingme*:#: if ($nick isin %list_of_users) { ctcp $nick ping | notice $nick (And here i don´t know how to tell him his ctcp ping reply)

Thanks smile


-= Porque pese a todo Dios .. aún te tengo fé =-
Joined: Feb 2004
Posts: 714
Z
Hoopy frood
Offline
Hoopy frood
Z
Joined: Feb 2004
Posts: 714
Code:
on 1:text:*!pingme*:#: if ($nick isin %list_of_users) { ctcp $nick ping }

on *:CTCPREPLY:PING*: {
  var %pingreply = $calc($ctime - $2) 
  .notice $nick You are %pingreply second(s) away from $server :)
}


Hope that helps smile


"All we are saying is give peace a chance" -- John Lennon
Joined: Jan 2003
Posts: 48
O
oSaYaP Offline OP
Ameglian cow
OP Offline
Ameglian cow
O
Joined: Jan 2003
Posts: 48
Yeah .. and a little more ..
is it possible to add this code miliseconds ?
eg:

This is the original message:
-|cLs|- You are 0 second(s) away from mercurio.irc.redhispana.org smile

That´s what i want:

-|cLs|- You are 0.573 second(s) away from mercurio.irc.redhispana.org smile


-= Porque pese a todo Dios .. aún te tengo fé =-
Joined: Feb 2004
Posts: 714
Z
Hoopy frood
Offline
Hoopy frood
Z
Joined: Feb 2004
Posts: 714
Yes, probably there is, but im not familiar how to.. smirk


"All we are saying is give peace a chance" -- John Lennon
Joined: Dec 2002
Posts: 102
M
Vogon poet
Offline
Vogon poet
M
Joined: Dec 2002
Posts: 102
To do miliseconds you can use $ticks, you need to manually record the value when you send the ping and then manually check the value when their client replies and compare the two. The accuracy of these things will vary based on how fast your PC actually processes the commands though, which defeats the purpose of trying to obtain such accuracy.


-
MIMP

Link Copied to Clipboard