mIRC Home    About    Download    Register    News    Help

Print Thread
#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 .

#65360 26/12/03 03:49 AM
Joined: Nov 2003
Posts: 227
H
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.

#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 ?

#65362 26/12/03 05:11 AM
Joined: Nov 2003
Posts: 227
H
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.

#65363 26/12/03 04:18 PM
Joined: Dec 2003
Posts: 10
A
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

#65364 26/12/03 04:19 PM
Joined: Dec 2002
Posts: 483
Pan-dimensional mouse
Offline
Pan-dimensional mouse
Joined: Dec 2002
Posts: 483
how do you make the lagometer thing? :tongue:

#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


Link Copied to Clipboard