Super cool, thanks!
Since this really isn't a connected application it would probably be a hassle to get current players since this seems to only be reading from the servers page.
If you could make remote calls to a server you could use
Code: Select all
mxserver.schedule_command(commandline)
to run "server, listplayers" every x seconds. Or maybe even use
Code: Select all
mxserver.connect_handler(slotnumber)
and
Code: Select all
mxserver.disconnect_handler(slotnumber)
, but in the documentation it says you can get disconnects without a connect if the players client fails to connect.
It may be a lot more work, but if you wanted to get server info in real-time you can write a service that runs on the server so you can make requests remotely to the IP addresses you already have from the server list and those requests can be executed from the service since it is localhost. Then the server info can be sent as JSON back to the server launcher. That may be too many requests to make depending on how many servers are "active" on the server list.
You'll have to take a look at the documentation for a complete list of functions you'd have to use in the production script. If nobody has any interest in writing an info service, I may give it a go if I have time.