- Timestamp:
- Jan 19, 2019, 6:12:21 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
binary-improvements/MapRendering/Web/Handlers/UserStatusHandler.cs
r332 r351 5 5 namespace AllocsFixes.NetConnections.Servers.Web.Handlers { 6 6 public class UserStatusHandler : PathHandler { 7 public UserStatusHandler (string moduleName = null) : base (moduleName) {7 public UserStatusHandler (string _moduleName = null) : base (_moduleName) { 8 8 } 9 9 10 public override void HandleRequest (HttpListenerRequest req, HttpListenerResponse resp, WebConnectionuser,11 int permissionLevel) {10 public override void HandleRequest (HttpListenerRequest _req, HttpListenerResponse _resp, WebConnection _user, 11 int _permissionLevel) { 12 12 JSONObject result = new JSONObject (); 13 13 14 result.Add ("loggedin", new JSONBoolean ( user != null));15 result.Add ("username", new JSONString ( user != null ?user.SteamID.ToString () : string.Empty));14 result.Add ("loggedin", new JSONBoolean (_user != null)); 15 result.Add ("username", new JSONString (_user != null ? _user.SteamID.ToString () : string.Empty)); 16 16 17 17 JSONArray perms = new JSONArray (); … … 19 19 JSONObject permObj = new JSONObject (); 20 20 permObj.Add ("module", new JSONString (perm.module)); 21 permObj.Add ("allowed", new JSONBoolean (perm.permissionLevel >= permissionLevel));21 permObj.Add ("allowed", new JSONBoolean (perm.permissionLevel >= _permissionLevel)); 22 22 perms.Add (permObj); 23 23 } … … 25 25 result.Add ("permissions", perms); 26 26 27 WebAPI.WriteJSON ( resp, result);27 WebAPI.WriteJSON (_resp, result); 28 28 } 29 29 }
Note:
See TracChangeset
for help on using the changeset viewer.