Tests your lag with the server, and updates it every minute in the titlebar (must be connected, only shows in titlebar)
;Usage: /lagtest (if you are not connected, it wont do anything)
alias lagtest {
; Only allow one at the same time, so not multi-server...
if ($timer(updateping)) halt
lagtest_update
}
alias -l lagtest_update {
if (!$server) halt
set %ticks $ticks | .enable #lagtest | .raw PING 123
.timerupdateping 1 60 lagtest_update
}
#lagtest off
on ^*:PONG:{
if ((%ticks) && (*123 iswm $1-)) {
%titlebar = $titlebar
if ($regex($titlebar,(.+?) \[(.*)ms\])/i) %titlebar = $regml(1)
titlebar %titlebar $+([,$+($calc($ticks - %ticks),ms),])
.disable #lagtest | unset %ticks | haltdef
}
}
#lagtest