rendered paste body;===================================
; High-Precision Ping
;===================================
; By ArchMage ZeratuL
alias pingz {
.msg $1 $chr(1) $+ PING $ticks $ticks $+ $chr(1)
}
alias noticePing {
.notice $1 Ping reply: $2 seconds
}
on *:ctcpreply:ping*: {
var %time = $ticks - $2
%time = $round($calc(%time / 1000),2)
if (%time > 0 && $2 == $3) {
echo -s $timestamp <12 $+ $nick - CTCP Reply> PING: %time seconds.
noticePing $nick %time
halt
}
if (%time > 0 && $2 != $3 && $3 != $null) {
echo -s $timestamp <12 $+ $nick - CTCP Reply> PING: %time seconds. Warning! Parameters don't match! Possible fake reply! ( $+ $2- $+ )
noticePing $nick %time
halt
}
if (%time <= 0) {
echo -s $timestamp <12 $+ $nick - CTCP Reply> PING: Fake reply!! ( $+ $2- $+ )
halt
}
halt
}