Server Query data
-
So the Steam version of MW3 used the Valve protocol to get data about the game server.
Is this still supported?
I need a way of getting player count and hostname value for our hosting platform.
Q#0 Buffer length: 25 bytes ff ff ff ff 54 53 6f 75 72 63 65 20 45 6e 67 69 6e 65 20 51 75 T S o u r c e E n g i n e Q u 65 72 79 00 e r y Q#0 UDP timeout detected Q#0 Query failed with error Error: UDP - Timed out after 2000ms
-
It uses the plain old Q3 protocol, any pre-made query for CoD 1 to 6 should work just fine.
-
Xerxes Thanks for confirming. I have just tried quake3 and it timed out too. Do I have to enable or set anything for the query stuff to work?
Q#0 Buffer length: 14 bytes ff ff ff ff 67 65 74 73 74 61 74 75 73 00 g e t s t a t u s Q#0 UDP timeout detected Q#0 Query failed with error Error: UDP - Timed out after 5000ms
-
What port are you trying?
-
Using 2304 for the server's
net_port
and I'm using that to query it as well.Package doing the querying: https://github.com/sonicsnes/node-gamedig/
CoD4 server on the same server;
Q#0 Buffer length: 14 bytes ff ff ff ff 67 65 74 73 74 61 74 75 73 00 g e t s t a t u s iphere:15505 <--UDP Buffer length: 422 bytes ff ff ff ff 73 74 61 74 75 73 52 65 73 70 6f 6e 73 65 0a 5c 5f s t a t u s R e s p o n s e \ _
-
Must be an issue on your end because it works perfectly fine.
-
Strange one. Works in HLSW (map and players) but has timeout for ping. I'll try investigate, now I know the correct protocol. Thanks for your time.
-
I don't think
getstatus
is implemented, or at least I'm not getting a response either. But instead you can usegetinfo
for fetching the hostname and other info of the server, andrcon "password" status
for fetching the playerlist and mapname. -
VVLNT That might be why then. Thanks for the insight.
-
Made a new protocol with quake3 but changed
getstatus
togetinfo
withinfoResponse
and I've got back this.EDIT:
clients
is player count? Might be good to go then!$ gamedig --type protocol-quake3info iphere:2304 --pretty { "name": "hostname here", "map": "mp_exchange", "password": false, "raw": { "protocol": "20604", "checksum": "-461731637", "hostname": "hostname here", "mapname": "mp_exchange", "clients": "1", "sv_maxclients": "18", "gametype": "war", "pure": "1", "con_disabled": "1", "kc": "1", "hw": "6", "mod": "0", "voice": "2\u0000ô¢" }, "maxplayers": "18", "players": [], "bots": [], "connect": "iphere:2304", "ping": 4 }