I've done this in Perl and Java. What language are you using? -----Original Message----- From: edman747 <edman...@gmail.com> To: Half-Life dedicated Linux server mailing list <hlds_linux@list.valvesoftware.com> Sent: Wed, 27 Oct 2010 10:08 PM Subject: [hlds_linux] server info query.
hey, I hacked out a script to monitor local or remote servers. it is kinda simple it sends a ping gets the reply then sends an info query and gets the reply. If I can figure out the rcon stuff I will add that. It loops through the received UDP packet (a 1400 byte array) to get the four variable length strings (servername, mapname, directory, description) then searches for an appid that is equal to 70. After the appid is found it increments through the byte array one byte at a time to get and format the rest of the data. ref: [URL] http://developer.valvesoftware.com/wiki/Server_queries#Source_servers_2[/URL] Having a little trouble with the extended data flag. Is anyone familiar with how to read or check the extended data? TIA, note, in the samples the AppID shows two items 70, xx the xx is the byte where the appid was found. (this varies based on the length of the server and map names) sample output: Type: I Protocol Version: 48 Server Name: Stealing jaffa cakes [trunk][2813] Map: c0a0 Game Directory: svencoop4 Game Description: Sven Co-op 4.6 or later AppID: 70, 80 Number of players: 0 Maximum players: 12 Number of bots: 0 Dedicated: d OS: w Password: 1 Secure: 0 Game Version: 1.1.2.1 EDF: 145 Type: I Protocol Version: 48 Server Name: [FR]SvenCoop4.5 AMXX(2) Rcbot Map: jumpers Game Directory: svencoop Game Description: Sven Co-op 4.5 AppID: 70, 68 Number of players: 2 Maximum players: 12 Number of bots: 2 Dedicated: d OS: w Password: 0 Secure: 1 Game Version: 1.1.2.1 EDF: 145 Type: I Protocol Version: 48 Server Name: sc4.x Test Server[2814] Map: c0a0e Game Directory: svencoop4 Game Description: Sven Co-op 4.6 or later AppID: 70, 70 Number of players: 0 Maximum players: 12 Number of bots: 0 Dedicated: d OS: w Password: 0 Secure: 0 Game Version: 1.1.2.1 EDF: 145 Type: I Protocol Version: 48 Server Name: ..::[Raspberry's H(e)aven]::[ LESS 4.07, MOAR 4.5 ]::.. Map: -HL_OpFor_SP_Portal Game Directory: svencoop Game Description: Sven Co-op 4.5 AppID: 70, 112 Number of players: 0 Maximum players: 6 Number of bots: 0 Dedicated: d OS: w Password: 0 Secure: 1 Game Version: 1.1.2.1 EDF: 144 _______________________________________________ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlds_linux _______________________________________________ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlds_linux