- Timestamp:
- Jan 19, 2019, 6:12:21 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
binary-improvements/MapRendering/Web/API/GetPlayersLocation.cs
r332 r351 6 6 namespace AllocsFixes.NetConnections.Servers.Web.API { 7 7 public class GetPlayersLocation : WebAPI { 8 public override void HandleRequest (HttpListenerRequest req, HttpListenerResponse resp, WebConnectionuser,9 int permissionLevel) {8 public override void HandleRequest (HttpListenerRequest _req, HttpListenerResponse _resp, WebConnection _user, 9 int _permissionLevel) { 10 10 AdminTools admTools = GameManager.Instance.adminTools; 11 user =user ?? new WebConnection ("", IPAddress.None, 0L);11 _user = _user ?? new WebConnection ("", IPAddress.None, 0L); 12 12 13 13 bool listOffline = false; 14 if ( req.QueryString ["offline"] != null) {15 bool.TryParse ( req.QueryString ["offline"], out listOffline);14 if (_req.QueryString ["offline"] != null) { 15 bool.TryParse (_req.QueryString ["offline"], out listOffline); 16 16 } 17 17 18 bool bViewAll = WebConnection.CanViewAllPlayers ( permissionLevel);18 bool bViewAll = WebConnection.CanViewAllPlayers (_permissionLevel); 19 19 20 20 JSONArray playersJsResult = new JSONArray (); … … 37 37 } 38 38 39 if (player_steam_ID == user.SteamID || bViewAll) {39 if (player_steam_ID == _user.SteamID || bViewAll) { 40 40 JSONObject pos = new JSONObject (); 41 41 pos.Add ("x", new JSONNumber (p.LastPosition.x)); … … 61 61 } 62 62 63 WriteJSON ( resp, playersJsResult);63 WriteJSON (_resp, playersJsResult); 64 64 } 65 65 }
Note:
See TracChangeset
for help on using the changeset viewer.