koraktor / steam-condenser

A multi-language library for querying the Steam Community, Source, GoldSrc servers and Steam master servers
https://koraktor.de/steam-condenser
Other
356 stars 67 forks source link

GameServer.updatePlayers() not returning players for CS:GO with "ddos" protection on #275

Closed basert closed 6 years ago

basert commented 9 years ago

Since some months ago, Valve introduced a patch for CS:GO that won't return the player names to S2A_PLAYER packets send to the server, but rather a maxplayer X/Y string. Because of that, the GameServer.updatePlayers() method fails, as it relies on this information for the player hashmap.

I verified this bug in Java and PHP. It's CS:GO only.

koraktor commented 9 years ago

I don't think this is really a bug, but nevertheless something that should be improved.

Do you have more information on the packet contents replied by such a server?

basert commented 9 years ago

Mhh, well, I think it is a bug. You are calling "getPlayers" in order to get player information. Internally it's calling "rcon status" and parses this. So there's no need of doing S2A_PLAYER before. This ddos protection is now standard on all vanilla servers as long as it's not disabled.

These are the rcon commands:

host_info_show 1
host_players_show 1
koraktor commented 9 years ago

rcon status is available for servers you have a RCON password for (and it has been provided). And even then a S2A_PLAYER request is needed to fill all details.

Depending on the response of such a CS:GO server there might be a way to handle this more gracefully.

basert commented 9 years ago

The request is returning "Max Players" as name and the maxplayers count as "frags"

dexslab commented 8 years ago

The issue is not steam condenser the issue is srcds u need to set host_players_show to 2 according to https://developer.valvesoftware.com/wiki/Server_queries

koraktor commented 6 years ago

Closing this as “Won’t fix”. It’s the server admins reponsibility to either set the CVAR correctly or not querying additional player information.

BrutalCSkakan commented 4 years ago

And what would you suggest when the host_players_show is set to 2, but still get the RCONGoldSrcResponsePacket when sending the A2S_PLAYER_Packet?