# 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 () ## 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= ``` ## 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}```