Difference between revisions of "Server:Web Interface"
From Silent Wings Wiki
(New page: The MP server will post info by HTTP to a web server at regular intervals. The web server can be specified with the -web command line switch: swserver -web=www.silentwings.no == Serve...) |
|||
Line 57: | Line 57: | ||
ID=%d&ServerID=%d&Crashed=%d&OnGround=%d&Idle=%d&Altitude=%d&Latitude=%.5f&Longitude=%.5f&Speed=%.1f&Heading=%d&TaskDist=%.1f&TaskTime=%d&Finished=%d | ID=%d&ServerID=%d&Crashed=%d&OnGround=%d&Idle=%d&Altitude=%d&Latitude=%.5f&Longitude=%.5f&Speed=%.1f&Heading=%d&TaskDist=%.1f&TaskTime=%d&Finished=%d | ||
+ | |||
+ | [[Category:Server]] |
Latest revision as of 09:28, 11 June 2007
The MP server will post info by HTTP to a web server at regular intervals.
The web server can be specified with the -web command line switch:
swserver -web=www.silentwings.no
Server info
On startup it sends the following parameters in a HTTP POST:
script name: /multiplayer/server_update/
Name=<server name> Scenery=<scenery name> Address=<ip address> Task=<task string> TaskDist=<task distance> Port=<port number> NumPlayers=<num players> MaxPlayers=<max num players> Uptime=<current uptime>
If there is a task, the task points are specified as:
TP<n>=<name>,<lat>,<lon>,<elev>,<beercan radius>,<angle1>,<angle2>,<obs.zone>
where <n> is a number from 0 to num TP-1.
This script should return a single line
ID=<integer>
This ID will be used for subsequent server updates
At regular intervals, this info is updated with the same script the two parameters
ID=<server id> NumPlayers=<num players> Uptime=<current uptime>
Player info
When a new player joins, the following info is sent:
script name: /multiplayer/player_update/
Name=%s&Nick=%s&Aircraft=%s&Reg=%s&CompID=%s&ServerID=%d
Returns
ID=<player id>
Subsequent updates:
ID=%d&ServerID=%d&Crashed=%d&OnGround=%d&Idle=%d&Altitude=%d&Latitude=%.5f&Longitude=%.5f&Speed=%.1f&Heading=%d&TaskDist=%.1f&TaskTime=%d&Finished=%d