mIRC6.3+ Lag Checker

By gooshie on Aug 23, 2009

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.

Image

on ^*:PONG:{
  var %x $gettok($2,2,58),%Lag = $round($calc(($ticks - $gettok($2,1,58))*.001),2)
  if %x { haltdef }
  if !$tip(Lag $cid) && %Lag > %x {
    beep 3
    noop $tip(Lag $cid,Lag %LaG seconds,   $me $network,9,$mircexe,41,window -ax "Status Window")
  }
}

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

Comments

Sign in to comment.
gooshie   -  Jan 17, 2010

Updated to prevent multiple tips per connection occuring.

 Respond  
SnoooP   -  Jan 09, 2010

Nice gooshie, works well for me, and considering my shitty connection this is pretty useful =) goodwork mate, keep it up!

 Respond  
gooshie   -  Nov 21, 2009

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. Also, I think the icon fits the script.

 Respond  
[jonathan]   -  Sep 19, 2009

used that addon.. and remoted but havent seen any action yet ! i might not in lag lmao..

okk whatever il give u feedback..

 Respond  
gooshie   -  Sep 18, 2009

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'

 Respond  
Jonesy44   -  Aug 27, 2009

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)"?

 Respond  
gooshie   -  Aug 26, 2009

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 difficult 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:

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.
 Respond  
Jonesy44   -  Aug 26, 2009

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

 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.