All returns are whitespace-delimited.



Most calls can return 'DENIED' on failure



HMAC_SHA1 below is the SHA-1 based HMAC as defined in RFC 2104, with the
resulting hash in hex-encoded ASCII.
The parameters are as follows:

char *HMAC_SHA1( char *inKey, char *inData )




=== Call:
server.php?action=reflect&email=email_address&twin_code=hash

Returns:
serverIP
serverPort
requiredVersionNumber
autoUpdateURL
OK


OR Returns:
NON_FOUND
0
0
0
OK


Where:
email     = email address of connecting user (used for sorting users)

twin_code  = (optional) SHA1 hash of twin code.


serverIP   = IP address of server this user should connect to
serverPort = the port number to connect to

requiredVersionNumber = the minimum client version number needed to connect
                        to this server
autoUpdateURL         = the URL of the diffBundle update server's server.php


NOTE:  the SHA1 hash of the twin code is NOT in place for security reasons,
       because it can be sniffed and replayed anyway.  It's just a clean way
       to turn an arbitrary string of characters into a parameter with a known
       format.




=== Call:
server.php?action=trigger_apocalypse&id=number&id_hash=hmac&name=name

Returns:
OK


id is a unique ID number for the apocalypse.  Must be greater than any previous
apocalypse IDs.

id_hash is computed with:
HMAC_SHA1( sharedSecret, id )

sharedSecret is a secret shared between official servers and the reflector.

name is the character name of the person who triggered the apocalypse.




=== Call:
server.php?action=check_apocalypse

Returns:
last_id
OK


last_id is the id of the last apocalypse that happened.
