Top

mIRC6.3+ Lag Checker


mIRC Code
+ 1 likes
Please Register to submit score.
Bookmark and Share
Average Score  0.0 (of 0 scores)
Date Added  Aug 23, 2009
Last Updated  Sep 20, 2009
Tags  lag  multiserver  tip 

Introduction

This is a lag checker that starts automatically on connect, pings
the server every 55 seconds, and warns if lag exceeds 5 seconds
using beeps and the new $tip feature. Double clicking the popup
$tip will focus the Status Window of the lagged connection.

Menu items are provided to immediately check lag, to change
the timing and threshold, and to turn off lag checking.



Grab the Code

menu * {
  -
  Check Lag:ping $ticks $+ :$
  Auto-Check Lag 3/33:.timerLag $+ $cid 0 33 ping $!ticks $!+ :3
  Auto-Check Lag 9/99:.timerLag $+ $cid 0 99 ping $!ticks $!+ :9
  Auto-Check Lag Off:.timerLag $+ $cid off
  All Auto-Check Lag Off:.timerLag* off
  -
}
 
on *:CONNECT:.timerLag $+ $cid 0 55 ping $!ticks $!+ :5
 
on ^*:PONG:{
  var %x $gettok($2,2,58),%Lag = $round($calc(($ticks - $gettok($2,1,58))/1000),1)
  if %x { haltdef }
  if %Lag > %x {
    beep 3
    return $tip(Lag,Lag %LaG seconds,   $me $network,9,$mircexe,41,window -ax "Status Window")
  }
}
 

Comments

  (6)  RSS
jonesy44
Comments: 1,856
 
mIRC Snippet:  mIRC6.3+ Lag Checker
Posted on Aug 26, 2009 6:12 pm
Might want to change the following line; return $tip(Lag,$me,Lag %LaG seconds,9)
for; return $tip(Lag,$network,Lag %LaG seconds,9)
So that you can identify the lag on a network, rather than a name.

Btw, lag is measured in MILIseconds, 12 seconds of lag is a LOT! Lol
gooshie
Comments: 66
 
mIRC Snippet:  mIRC6.3+ Lag Checker
Posted on Aug 26, 2009 9:04 pm
Jonesy:
Using $network was considered but dismissed because
often I am connected more than once per network so
it seems easier for me to know what is lagging if
it is per nickname. Also consider that the way it
is written it creates one lag test timer per server
connection but using $server would be even more dif-
ficult to figure out what was lagging. It is useful
to test each server connection and not just each
network connection however, if you wish to change it
to $network then also consider changing the on connect
event to match as well:

Code:
on *:CONNECT:.timerLag $+ $network 0 55 ping $!ticks


You will also need to edit the menu items to match.
To be honest I only use the Check Lag Now menu item
and provided the other items to make it appear more
complete.

This is about the 10+ lag test version i have
written over the years including one version that
averaged lag over time storing the values in a
hash table so as to calculate average lag to too
many decimal places. After all this i arrived at
the following conclusions:

  • Lag comes and goes over time and varies from
    test to test.
  • It's really ok to round it off to 1 or 2 decimal
    places.
  • I really don't need to know what my lag is until
    it's bad.
  • Less than 5 seconds of lag is ok.
  • No one cares how much lag I have so no need to
    msg/describe it to a channel.


BTW, I faked the 12.96 seconds lag for the screen shot by
using /ping $ticks[TABBED IT] counted to ten and sent.
jonesy44
Comments: 1,856
 
mIRC Snippet:  mIRC6.3+ Lag Checker
Posted on Aug 27, 2009 3:07 am
Ahh ok, i am connected to many different servers as the same nickname, so this script to me would be fairly useless without the changes i'd make.

I don't really get your comment though, using $server? I suggested $network which gives the network suggested name of the server you're on.

How about comine them both so you would get something like "QuakeNet (Jonesy44)"?
gooshie
Comments: 66
 
mIRC Snippet:  mIRC6.3+ Lag Checker
Posted on Sep 18, 2009 9:54 pm
Jonesy:
Thanks for the comments. I too sometimes have the same nickname on
more than one network and have updated the snippet as suggested.
At the same time i decided to add a feature that allows the user
to double click the popup $tip and focus the status window of the
lagged connection. To add this feature it was neccesary to specify
an icon for the $tip so i choose to use one supplied with mirc.exe,
specifically the one with the broken lightning bolt and question mark.
(After all these years I still havent figured out why broken lightning
bolt means connected and complete lightning bolt means unconnected.)

I only mentioned $server in case someone else was thinking of it.
Btw, your description of the $network identifier is not exactly correct.
/help $network
Returns the name of the IRC network you are currently connected to.
Note: It may not be possible to get this info if a network doesn't provide it.

$network and $server are not the same thing. $network may have more than
one $server and some $network may allow more than one connection. also
(unfortunately) $network and $server DO NOT have to be unique names on
the internet. The DOMAIN name MUST be unique and so must $serverip
BUT $network and $server are sent out by the SERVER in the raw 001-005
lines during connect and can be anything they set it to. Traditionally
they will reflect/include the registered domain name in some manner.
Also, if the network has more than one server all the servers typically
use the same name for $network (altho it is not required).

Note: In the screen shot Local-Chat is the name of my 'network'
[jonathan]
Comments: 6
 
mIRC Snippet:  mIRC6.3+ Lag Checker
Posted on Sep 19, 2009 12:43 am
used that addon.. and remoted but havent seen any action yet ! i might not in lag lmao..

okk whatever il give u feedback..
gooshie
Comments: 66
 
mIRC Snippet:  mIRC6.3+ Lag Checker
Posted on Nov 21, 2009 6:16 am
Ghost_Writer brought it to my attention that the icon was not
needed as I posted above and could have been left null as such:
$tip(Lag,Lag %LaG seconds,   $me $network,9,,,window -ax "Status Window")
I'm leaving it the way it is to avoid having to change the
screen shot as the icon does not cause any issues.

Commenting Options

Register or Login to Hawkee.com or use your Facebook or Twitter account by clicking the corresponding button below.

  
Bottom