Username:    Password:        Click Here To Signup     Forgotten Password
Main Menu
Online
Members: 0

Guests: 18

112.111.x.x forum
112.111.x.x forum
112.111.x.x forum
123.125.x.x forum
180.76.x.x forum
180.76.x.x forum
188.143.x.x forum
192.157.x.x forum
192.80.x.x forum
192.80.x.x forum
42.62.x.x lgsl
50.16.x.x forum
59.58.x.x news
59.58.x.x news
61.241.x.x forum
66.249.x.x forum
66.249.x.x forum
8.35.x.x forum

Last Seen

xiagang Tue 03:08
Zipps Tue 03:07
Wussie Mon 18:32
Dodgeitorelse Mon 13:58
Hostprofil Mon 12:44

Newest Members

Forums
server offline cs 1.6
Dodgeitorelse
Wed Sep 26 2012, 05:47PM
Posts: 175
Joined: Sun Dec 12 2010, 09:16AM
Registered Member #6457
so is this all the extra info for cs1.6 as compared to cs zero?
any way I am not much of a coder when it comes to protocols and such and no I don't have error reporting turned on. Any how it is closer than it was so I stand with you ans wait for the guru to solve it completely. Thank you for the code fix wussie. cheers
Website
Myma
Wed Sep 26 2012, 07:31PM
Posts: 6
Joined: Thu Nov 11 2010, 08:41AM
Registered Member #6399
Dodgeitorelse wrote ...

myma the server you listed in your post is showing as online.
the code I posted above is not for speed, it is to get source servers extra info to show on the details page.

see http://chevys-place.nl/gsreaders_test/compact_block.php

Here http://www.greycube.co.uk/lgsl/test/ its shows as offline (on pure lgsl too).
Dodgeitorelse
Wed Sep 26 2012, 09:21PM
Posts: 175
Joined: Sun Dec 12 2010, 09:16AM
Registered Member #6457
yes shows offline because you have not modified the portocol as we have posted here
Website
Myma
Mon Oct 01 2012, 04:39AM
Posts: 6
Joined: Thu Nov 11 2010, 08:41AM
Registered Member #6399
Oh, we don't understand each other. I asked about known bugs, which can cause this modifications and possible reducing of query speed.

I found a bug. If server is offline it shows like this:

instead of this:

Dodgeitorelse
Mon Oct 01 2012, 07:37AM
Posts: 175
Joined: Sun Dec 12 2010, 09:16AM
Registered Member #6457
I agree with the bug issue. I have your server listed as online and not showing any map name or server name but is showing as online. will look into it.
Website
Myma
Mon Oct 01 2012, 12:29PM
Posts: 6
Joined: Thu Nov 11 2010, 08:41AM
Registered Member #6399
That is not what i mean. The main problem is that if server gone down it lost all info and lists with offline servers doesn't look pretty good
Wussie
Mon Oct 01 2012, 09:39PM

Posts: 160
Joined: Sun Mar 22 2009, 06:53AM
Registered Member #4938
You're right. Just make this correction to the same line we had adjusted before:
$packet = fread($lgsl_fp, 4096); if (!$packet) { if ($lgsl_need['e']) { $lgsl_need['e'] = FALSE; return TRUE; } else { return FALSE; } }


This seems to allow online AND offline servers to be displayed correctly. I hope I got it right this time, thanks Myma for the bug report.
The extra info seems a bit short and I'm not sure it's complete, but I guess it's better than nothing.
Website
Wussie
Sun Dec 30 2012, 03:02PM

Posts: 160
Joined: Sun Mar 22 2009, 06:53AM
Registered Member #4938
I think I have a more permanent solution now for the given issue. This time it allows some servers to display full extra info together with player list. Other servers will only display a few extra info with the player list.
I came to the conclusion that the difference between full info and less info is due to some server setting and LGSL can't do anything to change the amount of info retrieved from the server, it's up to the server admin.
There are no more issues with live servers displayed as offline as far as I know, please let me know if you find any more bugs.

This is how you can implement the bugfix, starting from the original, unmodified lgsl_protocol.php: under "function lgsl_query_05(...." find
elseif ($lgsl_need['p']) { fwrite($lgsl_fp, "\xFF\xFF\xFF\xFFplayers\x00"); }
elseif ($lgsl_need['e']) { fwrite($lgsl_fp, "\xFF\xFF\xFF\xFFrules\x00"); }
}
else
{
$challenge_code = isset($lgsl_need['challenge']) ? $lgsl_need['challenge'] : "\x00\x00\x00\x00";

if ($lgsl_need['s']) { fwrite($lgsl_fp, "\xFF\xFF\xFF\xFF\x54Source Engine Query\x00"); }
elseif ($lgsl_need['p']) { fwrite($lgsl_fp, "\xFF\xFF\xFF\xFF\x55{$challenge_code}"); }
elseif ($lgsl_need['e']) { fwrite($lgsl_fp, "\xFF\xFF\xFF\xFF\x56{$challenge_code}"); }
and replace with
elseif ($lgsl_need['e']) { fwrite($lgsl_fp, "\xFF\xFF\xFF\xFFrules\x00"); }
elseif ($lgsl_need['p']) { fwrite($lgsl_fp, "\xFF\xFF\xFF\xFFplayers\x00"); }
}
else
{
$challenge_code = isset($lgsl_need['challenge']) ? $lgsl_need['challenge'] : "\x00\x00\x00\x00";

if ($lgsl_need['s']) { fwrite($lgsl_fp, "\xFF\xFF\xFF\xFF\x54Source Engine Query\x00"); }
elseif ($lgsl_need['e']) { fwrite($lgsl_fp, "\xFF\xFF\xFF\xFF\x56{$challenge_code}"); }
elseif ($lgsl_need['p']) { fwrite($lgsl_fp, "\xFF\xFF\xFF\xFF\x55{$challenge_code}"); }

then find
$packet = fread($lgsl_fp, 4096); if (!$packet) { return FALSE; }
and replace with
if (!($packet = fread($lgsl_fp, 4096))) {
if ($lgsl_need['s']) { return FALSE; }
elseif ($lgsl_need['e']) { $lgsl_need['e'] = FALSE; return TRUE; }
else { return TRUE; }
}

Next find
elseif ($lgsl_need['p']) { if ($packet[4] == "m" || $packet[4] == "I") { continue; } }
elseif ($lgsl_need['e']) { if ($packet[4] == "m" || $packet[4] == "I" || $packet[4] == "D") { continue; } }
and replace with
elseif ($lgsl_need['e']) { if ($packet[4] == "m" || $packet[4] == "I" || $packet[4] == "D") { continue; } }
elseif ($lgsl_need['p']) { if ($packet[4] == "m" || $packet[4] == "I") { continue; } }

Further down, find
$server['p'][$player_key]['pid'] = ord(lgsl_cut_byte($buffer, 1));
and replace with
lgsl_cut_byte($buffer, 1);
This is just a minor optimization which removes the fairly useless parameter "pid" associated with every player in the list (optional).
And finally, find
elseif ($lgsl_need['p']) { $lgsl_need['p'] = FALSE; }
elseif ($lgsl_need['e']) { $lgsl_need['e'] = FALSE; }
and replace with
elseif ($lgsl_need['e']) { $lgsl_need['e'] = FALSE; }
elseif ($lgsl_need['p']) { $lgsl_need['p'] = FALSE; }

Basically, my modification will request the extra info BEFORE the player list, because servers seem not to like it the other way around. This fix affects all the HL/HL2/Source based games, including all versions of CS, MW3, NS2 and has been tested by me with all of them. Feel free to do your own testing.
Website
Go to page   <<       

Jump:     Back to top


You are not logged in - Click Here To Signup

Username:    Password:   

Mini Buttons

.... © GreyCube.com - Richard Perry - Powered by e107.org