specificially, penalize servers that support both v4 and v5
Reasoning: We, as a project, have no interest in promoting servers
that intentionally restrict themselves to the feature set of an old,
potentially buggy version.
Using geolite2, we attempt to detect the continent of the server
and store the 'continent code' in the serverlist. This is reasonably
broad enough to help players in the client find truly "nearby" server.
The client will have to be changed to select a continent to change
ordering or filtering.
serverUp uses hex spaghetti to send and receive a short sequence of packets, to see whether a server is online.
The packet format is now annotated for easier cross-reference with minetest source.
Calls to save() in purgeOld() and update() were in race condition.
Race condition was eliminated by extending the lock scope within purgeOld().
Calls to load() were in race condition with themselves.
While current use of load() (called only during construction of class ServerList()) does not manifest the bug, any future change introducing concurrent use of load() would.
Race condition potential was eliminated by extending the lock scope within load().
Sometimes the list was send in a corrupted form. This
appeared to be the result of overwriting the file as it
was being read by the server. This commit tries to fix
this by saving to a temporary file and then moving it over
the served file.
This is a standard way of indicating requirements for
Python projects, since it makes it easy to automatically
install all needed packages with the correct versions.
This makes some options non-optional -- allowing for a smaller config file.
This also removes the X-Sendfile example, bucause the proxy server should
handle static files directly and the option is not at all specific to this
particular application (and general Flask options aren't documented).