mIRC Home    About    Download    Register    News    Help

Print Thread
#18117 05/04/03 11:23 AM
Joined: Apr 2003
Posts: 1
H
HiDe Offline OP
Mostly harmless
OP Offline
Mostly harmless
H
Joined: Apr 2003
Posts: 1
i need help about CTCP PINGREPLY any body know how to msg it at channel went somebody taiping !ping ?

#18118 05/04/03 12:19 PM
Joined: Dec 2002
Posts: 774
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Dec 2002
Posts: 774
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:
Code:
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... grin


Code:
//if ( khaled isgod ) echo yes | else echo no
#18119 06/04/03 06:59 AM
Joined: Dec 2002
Posts: 2,809
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 2,809
theRat, for someone that was criticizing people for not using search, you sure give a decent of wrong information. When someone sends a ping it does NOT send an uptime, I haven't a clue where you got that idea. Using /debug when I ping myself I see:

-> theserver PRIVMSG codemastr :PING 1049612220

My PC has been up for 2 hours, 1049612220 translates to roughly 33 years. What it is actually sending is the current time. using unix epoch format. Thats very different than an uptime.

#18120 06/04/03 01:44 PM
Joined: Dec 2002
Posts: 1,527
_
Hoopy frood
Offline
Hoopy frood
_
Joined: Dec 2002
Posts: 1,527
its actually the current time difference between january 1 1970 isnt it? altho i could be mistaken


D3m0nnet.com
#18121 06/04/03 06:03 PM
Joined: Dec 2002
Posts: 2,809
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 2,809
yes, which is also known as unix epoch format.


Link Copied to Clipboard