tltneon / lgsl

LGSL v6.2.1/v7.0.0 for PHP 5.4-8.3+ (Live Game Server List): online status for CS2 (Source Query), Discord, FiveM, Rust, SA:MP, GMOD, Minecraft, Teamspeak and 200+ more games!
GNU General Public License v3.0
152 stars 48 forks source link

No players info for new A2S_INFO #60

Closed accelerator74 closed 3 years ago

accelerator74 commented 3 years ago

For left 4 dead 2 servers (possibly other games), which recently switched to the new A2S_INFO, there is no information about the players (nickname, score and play time) in full info about server.

The problem arises because of this https://github.com/tltneon/lgsl/blob/master/lgsl_files/lgsl_protocol.php#L644. In the data array, in response to the request, there are 0 players for 0 element. However, element 1 and 2 contain the number of players. The old query had 4 elements, now 3, one of which for some reason is always 0.

At the moment, I temporarily did it like this if ($lgsl_need['p'] && $server['s']['players'][1] == "0") { $lgsl_need['p'] = FALSE; } but I don't think this is the correct fix.

tltneon commented 3 years ago

Hello @Accelerator74! Can you show me screenshots of this cases?

I know about new A2S_INFO and some time ago it was fixed #47 Also I tested it with various servers: image And one of server details: image image

accelerator74 commented 3 years ago

These servers use the old steamclient (replaced the original one). Try to scan the server: 46.174.52.15:27255, it uses a new steamclient.

tltneon commented 3 years ago

L4D2 may not to send players details with first query. But anyway does it: image

accelerator74 commented 3 years ago

I have corrected the server address to be checked - 46.174.52.15:27255 :) It definitely cannot be scanned. I will send you a screenshot when my web host resumes my site ...

accelerator74 commented 3 years ago

noplayers

tltneon commented 3 years ago

Now scanning process goes correctly image

accelerator74 commented 3 years ago

Yes, but it broke queries for servers, that use the old protocol :) For example: -1 / 25 (when will we see the details) null

tltneon commented 3 years ago

Meh, stupid case xD I forgot checking whether already packet with main info is come

accelerator74 commented 3 years ago

Now when the server on the old protocol is empty, monitoring shows the number of players -1 😄