mIRC Home    About    Download    Register    News    Help

Print Thread
lag bar #65359 26/12/03 01:59 AM
Joined: Dec 2002
Posts: 332
C
Cheech Offline OP
Fjord artisan
OP Offline
Fjord artisan
C
Joined: Dec 2002
Posts: 332
i would like to create a lagbar using a dialog i think i can do this but i dont know how to check the lag ? i assumed you would use the ping from the server to update it but not sure ?
i would just like to know how to get the actuall sirver ping or whats best i messed around with a timer and /ping $me but there must be a better way?

thanks .

Re: lag bar #65360 26/12/03 03:49 AM
Joined: Nov 2003
Posts: 227
H
Hitchhiker Offline
Fjord artisan
Offline
Fjord artisan
H
Joined: Nov 2003
Posts: 227
I've seen people do it by ctcp $me ping, but that will give you a false reading, in that it will be double your lag, and it uses more bandwidth because you are sending more than one message to the server. You can just send the server a number to pong to you, test with this.
Code:
on ^*:pong:{
  if ($2 isnum) {
    echo -s SERVER lag is $calc($ticks - $2) ms.
    halt
  }
}

then just type //ping $ticks
that will work out the lag in miliseconds.

Re: lag bar #65361 26/12/03 05:07 AM
Joined: Dec 2002
Posts: 332
C
Cheech Offline OP
Fjord artisan
OP Offline
Fjord artisan
C
Joined: Dec 2002
Posts: 332
doesnt seem to do anything ? is
On ^*:pong: valid on all mirc versions ?
is there not an event to simply evaluate the Ping? pong! event ?

Re: lag bar #65362 26/12/03 05:11 AM
Joined: Nov 2003
Posts: 227
H
Hitchhiker Offline
Fjord artisan
Offline
Fjord artisan
H
Joined: Nov 2003
Posts: 227
yes on ping and on pong are those events.

You dont need the on ^*:pong that was just to halt the default * PONG from irc.servername.com: <number>
should work ok, try a new remote file, see if that works.

Re: lag bar #65363 26/12/03 04:18 PM
Joined: Dec 2003
Posts: 10
A
aquanight Offline
Pikka bird
Offline
Pikka bird
A
Joined: Dec 2003
Posts: 10
You could possibly also calculate the SERVER lag of another user, possibly with CTCP PING of the user followed by the PING/PONG method. Once you have both times, I would think subtracting them could tell you the server lag of the other user.

BTW, starting the PING/PONG process will require this command unless you delete /ping from your aliases:
//raw -q PING $ticks

Re: lag bar #65364 26/12/03 04:19 PM
Joined: Dec 2002
Posts: 477
Deep3D Offline
Fjord artisan
Offline
Fjord artisan
Joined: Dec 2002
Posts: 477
how do you make the lagometer thing? :tongue:

Re: lag bar #65365 26/12/03 07:07 PM
Joined: Dec 2002
Posts: 332
C
Cheech Offline OP
Fjord artisan
OP Offline
Fjord artisan
C
Joined: Dec 2002
Posts: 332
well i havent quite finished it eyt but currently i use

Code:
 
;on ^*:pong:{  
if ($2 isnum) {    
  set %lagcheck2 $calc($ticks - $2) 
  echo -a 00,04 SERVER lag is $round($calc(%lagcheck2 / 1000),2) seconds.
  halt 
}
}
;on ^*:PING:{ 
if ( $server isin $1- ) {
inc %lagcheck
}
if ( %lagcheck &lt;= 4 ) { goto end } 
elseif ( %lagcheck == 5 ) {
  /.raw PING $ticks
  set %lagcheck 1
}
:end
halt
}


i check the lag on every 5th ping? pong! event you could do it each time but i figured it wasnt necessary to update it that often from . now i just need to dock it somewhere .lol