ajanata / PretendYoureXyzzy

A web clone of the card game Cards Against Humanity.
https://pretendyoure.xyz/zy
BSD 2-Clause "Simplified" License
1.22k stars 397 forks source link

Server advanced ping #170

Closed devgianlu closed 6 years ago

devgianlu commented 6 years ago

In my app, I've implement the possibility to add custom server and therefore I need some way of telling if the server is up. A simple ping isn't enough because every site would appear as a valid server. Is there any way to tell whether the address is correct and maybe also get some additional information? (Something like the game webpage with the three servers). I didn't want to use the FirstLoad handler because I thought it would create a big amount of traffic.

ajanata commented 6 years ago

The server list page uses stats.jsp to get its information. Not being able to load that page, or not finding those keys on it, prompts the "server down?" message.