chacha a712660311 | ||
---|---|---|
Sources | ||
System | ||
LICENSE | ||
README.md | ||
Run.sh |
README.md
UT99-Mod-ChaChaRESTStats
A tiny mod to allow reading server stats with REST requests.
!!! Requires UT99 v451+, not compatible with v436, preferred 469+.
Installation
On Linux (crudini required)
./Run.sh <Your UT99 Installation Path> (<custom UnrealTounrnament.ini>)
Manual installation
Copy ChaChaRESTStats.u file to your UT99 System dir
Edit UnrealTournament.ini and update / adapt [UWeb.WebServer] section:
[UWeb.WebServer]
Applications[0]=UTServerAdmin.UTServerAdmin
ApplicationPaths[0]=/ServerAdmin
Applications[1]=UTServerAdmin.UTImageServer
ApplicationPaths[1]=/images
Applications[2]=ChaChaRESTStats.ChaChaRESTStats
ApplicationPaths[2]=/api/v1
DefaultApplication=0
bEnabled=True
ListenPort=<YOUR_LISTEN_PORT>
Available Resources:
GET /api/v1/map_list
GET /api/v1/current_all
GET /api/v1/current_game
GET /api/v1/current_players
GET /api/v1/default_all
GET /api/v1/defaults_settings
GET /api/v1/defaults_rules
GET /api/v1/defaults_server
Sample Output
GET http://YOUR_SERVER_IP:YOUR_LISTEN_PORT/api/v1/map_list
{"Maplist":["CTF-Gauntlet.unr","CTF-Command.unr","CTF-Coret.unr","CTF-Dreary.unr","CTF-LavaGiant.unr","CTF-November.unr"]}
GET http://YOUR_SERVER_IP:YOUR_LISTEN_PORT/api/v1/current_all
{"GameName":"Capture the Flag","GameClass":"Botpack.CTFGame","LevelTitle":"Lava Giant","Level":"CTF-LavaGiant","Mutators":["Botpack.FatBoy"],"player_list":[{"PlayerName":"chacha","Ping":25,"Score":0.000000,"bIsABot":False,"bIsSpectator":False,"IP":"172.16.4.101"}]}
GET http://YOUR_SERVER_IP:YOUR_LISTEN_PORT/api/v1/default_all
{"GameStyle":"Turbo","GameSpeed":100.000000,"AirControl":35.000000,"UseTranslocator":True,"MaxPlayers":16,"MaxSpectators":2,"bMultiWeaponStay":True,"bTournament":False,"bPlayersBalanceTeams":False,"bForceRespawn":False,"GoalTeamScore":3.000000,"TimeLimit":0,"FriendlyFireScale":0.000000,"ServerName":"Another UT Server","AdminName":"","AdminEmail":"","MOTDLine1":"","MOTDLine2":"","MOTDLine3":"","MOTDLine4":"","bWorldLog":True}