Server Talk > Server Discussion

Request server's details

(1/2) > >>


Web lobby uses such request to get informations about currently running servers:`c=all`v=all`bots=all`locked=all`r=all`s=all`a=all`w=all`os=all`pl=all`namedItem=undefined`item=undefined`undefined=undefined.

My question is if there's any possibility to query for informations about a specific server - not all of them. So I would have a request like that (for example):
--- Code: ---/getInfoAboutServer?ip=
--- End code ---

Yea, I could query everything and search for the desired server but I wonder if there are extra possibilities.

And one would return JSON for that ip and port i.e.:

--- Code: ---{"t":"#soldatladder","ip":"","gs":"3","pl":"0","c":"de","map":"HallOfHeroes","v":"1.7.0","mp":"32","bp":"0","os":"linux","pw":true,"info":""}
--- End code ---

Also, if there is a way to query for more data than currently it is available with above request? Names of players those are playing on server for example.

Hopefully, I'm not asking something that was already answered elsewhere.


No  ;)

You can download server's gamestats.txt via map port using soldat's file protocol. This would solve both of your issues (only one server, more data).

EDIT: More info here

We could theoretically make such a json api for the lobby, but as falcon said you can just read gamestat.txt and parse that. Or parse refresh/refreshx if you have rcon access.

Ugh, dunno what I'm doing incorrectly but I can't get that gamestat.txt file downloaded. I increased the port by 10 as it is said here. Then, I tried to get file with such request from the browser's address directly so it's HTTP GET (maybe that's wrong idea):

--- Code: ---
--- End code ---
Most probably my mistake has very simple solution but so I'm no more stuck and I don't have much time for digging I decided to ask you, guys :)

Btw. I'm not perfectly aware if this server has set Allow_Download=1 but I assumed that because this is a default value for Soldat.ini config file.


[0] Message Index

[#] Next page

Go to full version