Page 1 of 1

Extract current server player count

Posted: Thu Feb 20, 2020 6:18 am
by xXDarkVikingXx
Hi,

I'm currently making a little script for my website that supplies the player counts of all game servers running on the machine (minecraft, factorio etc).
Now to do this for minecraft I simply sniffed out the TCP package with wireshark, and the returned package from the server contains all info, including the player count.
However, for direct connect in factorio, you dont get the player count returned, only the MotD and some other stuff.
Now there is the server browser, but for that I'd have to authenticate with my credentials, which makes this much more complicated. You can't intercept the package there since it's TLS encrypted (thank god).

Question is, how else can I get that number? A mod would probably work, but again thats quite a lot of work and brings new problems.

Re: Extract current server player count

Posted: Tue Feb 25, 2020 3:18 am
by Therax
Do you run your server with RCON enabled? If so it's as simple as sending the "/players online count" command via the RCON interface.

Re: Extract current server player count

Posted: Sat Mar 14, 2020 4:33 pm
by xXDarkVikingXx
I don't, but it won't be a problem setting it up real quick, this should do exactly what i was looking for, I didn't think of RCON, thank you so much!