dalbothek / MVHP

Minecraft VirtualHost Proxy
23 stars 7 forks source link

Replace static player count with number of current proxy clients #1

Closed pauln closed 12 years ago

pauln commented 12 years ago

Instead of having a static player count (defined in the config file), report the number of current proxy clients as the number of players. It's not quite a perfect solution - ideally (given the lack of hostname in the server info request), it'd poll all servers it's proxying for and report the actual number of connected players (and the total number of player slots, too - that's still static for now). It can potentially report extra players if they poll for info at the exact same time and haven't yet been kicked with the info packet, but the chances are slim and it's still more accurate than a static figure.

This pull request also includes a fix for a very minor typo (as a separate commit).