Jump to content
Countdown To Christmas!



Stormy

eXonyte's ping script

Recommended Posts

Zandor said:
Sep 28th, 2008, 11:43am
; Millisecond Pinger by eXonyte
; Type /mping <nickname> to ping someone in milliseconds instead of seconds.
; Also attempts to maintain compatibility with normal /ctcp <nick> PING replies,
; and will display the text if someone's script replies with text instead of a number.

; Alias to send a millisecond ping
alias mping {

; Sends the actual ping as a raw
.raw PRIVMSG $$1 : $+ $chr(1) $+ PING $ticks $+ $chr(1)

; Echoes a CTCP PING lookalike to the active window
echo $colour(ctcp) -t $+ $iif($active == Status Window,se,a) -> [[ $+ $$1 $+ ]] PING
}

; Handles CTCP PING replies
on *:CTCPREPLY:*PING*: {

; If the reply isn't a number, let mIRC handle it
if ($2 !isnum) { return }

; If the current $ticks minus the reply is greater than 0
if ($calc($ticks - $2) > 0) {

; Echo the ping reply to the active window
echo $colour(ctcp) -at $+ $iif($active == Status Window,e) [[ $+ $nick PING reply]: $calc($ticks - $2) $+ ms

; And halt so that mIRC doesn't show its own ping reply
halt
}
}

Share this post


Link to post
Share on other sites
 
 
 
 
 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
  • Create New...