Project

General

Profile

[Script] CTCP Ping reply in milliseconds v0.1

Added by Mr. BS over 8 years ago

Requested by stonecold and based in this.

Preview before/after

; CTCP Ping reply in milliseconds
; http://dev.adiirc.com/boards/5/topics/594
; v0.1 by pereba

on ^*:ctcpreply:ping *:{
  if ($($+(%,ping,$nick),2)) {
    haltdef
    echo -atc ctcp $replacex($prefixctcp,$chr(32),$chr(160)) $replacex($adilang(CTCPReply0From1),{0},$chr(2) $+ PING $calc(($ticks - $v1)/1000) $+ ms $+ $chr(2),{1},$chr(2) $+ $nick $+ $chr(2))
    unset %ping [ $+ [ $nick ] ]
  }
}

alias ctcp {
  if ($2 == ping) set -u100 %ping $+ $1 $ticks
  !ctcp $1-
}