Basic lagtest

By QuickStep on Apr 16, 2005

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

Comments

Sign in to comment.
DarthReven   -  Apr 20, 2005

nice addon QuickStep

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.