Unity-Technologies / qstat

New official qstat repository
Artistic License 2.0
121 stars 33 forks source link

add Savage master support #6

Open illwieckz opened 9 years ago

illwieckz commented 9 years ago

Hi, for XQF we used some ugly hacks to browse Savage master support, but I think the better place to do it is in QStat itself.

QStat already knows how to query Savage servers, but not Savage Masters.

The Savage Master query is an HTTP query on this url: http://masterserver.savage.s2games.com/gamelist_full.dat

The answer is a binary file with this format:

[0x7E header byte]
[0x41 header byte]
[0x03 header byte]
[EOF]
[EOF]
[ip1 byte1]
[ip1 byte2]
[ip1 byte3]
[ip1 byte4]
[port1 word byte1]
[port1 word byte2]
[ip2 byte1]
[ip2 byte2]
[ip2 byte3]
[ip2 byte4]
[port2 word byte1]
[port2 word byte2]
…

There is a working proof of concept (shell script) here: https://github.com/XQF/xqf/blob/1f3790133a5416e6d2a09e27366608d1fd3f785f/src/qstat_savage.sh

stevenh commented 9 years ago

That should be totally possible.

Unfortunately I don't have time to spend on this ATM, so feel fee to put in a pull request which implements this and I'm make time to review it :)

illwieckz commented 9 years ago

Yes, I will work on it right after finishing the Teeworlds support. :smile: About Teeworlds, can you answer to this question : https://github.com/multiplay/qstat/pull/4#issuecomment-63639152 ? :wink:

Thanks a lot.