Changeset 360 for binary-improvements/MapRendering
- Timestamp:
- Aug 23, 2020, 9:52:01 AM (4 years ago)
- Location:
- binary-improvements
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
binary-improvements
- Property svn:ignore
-
old new 1 1 bin 2 .idea
-
- Property svn:ignore
-
binary-improvements/MapRendering/ModInfo.xml
r358 r360 5 5 <Description value="Render the game map to image map tiles as it is uncovered" /> 6 6 <Author value="Christian 'Alloc' Illy" /> 7 <Version value="3 3" />7 <Version value="35" /> 8 8 <Website value="http://7dtd.illy.bz" /> 9 9 </ModInfo> -
binary-improvements/MapRendering/Web/API/ExecuteConsoleCommand.cs
r351 r360 31 31 } 32 32 33 AdminToolsCommandPermissions atcp = 34 GameManager.Instance.adminTools.GetAdminToolsCommandPermission (command.GetCommands ()); 33 int commandPermissionLevel = GameManager.Instance.adminTools.GetCommandPermissionLevel (command.GetCommands ()); 35 34 36 if (_permissionLevel > atcp.PermissionLevel) {35 if (_permissionLevel > commandPermissionLevel) { 37 36 _resp.StatusCode = (int) HttpStatusCode.Forbidden; 38 37 Web.SetResponseTextContent (_resp, "You are not allowed to execute this command"); -
binary-improvements/MapRendering/Web/API/GetAllowedCommands.cs
r351 r360 9 9 JSONArray entries = new JSONArray (); 10 10 foreach (IConsoleCommand cc in SdtdConsole.Instance.GetCommands ()) { 11 AdminToolsCommandPermissions atcp = 12 GameManager.Instance.adminTools.GetAdminToolsCommandPermission (cc.GetCommands ()); 13 if (_permissionLevel <= atcp.PermissionLevel) { 11 int commandPermissionLevel = GameManager.Instance.adminTools.GetCommandPermissionLevel (cc.GetCommands ()); 12 if (_permissionLevel <= commandPermissionLevel) { 14 13 string cmd = string.Empty; 15 14 foreach (string s in cc.GetCommands ()) { -
binary-improvements/MapRendering/Web/API/GetServerInfo.cs
r351 r360 9 9 JSONObject serverInfo = new JSONObject (); 10 10 11 GameServerInfo gsi = Steam.Masterserver.Server.LocalGameInfo;11 GameServerInfo gsi = ConnectionManager.Instance.LocalServerInfo; 12 12 13 13 foreach (string stringGamePref in Enum.GetNames (typeof (GameInfoString))) { -
binary-improvements/MapRendering/Web/Web.cs
r352 r360 245 245 } 246 246 } catch (Exception e) { 247 Log.Out ("Error in Web.HandleRequest(): " + e); 247 Log.Error ("Error in Web.HandleRequest(): "); 248 Log.Exception (e); 248 249 } finally { 249 250 if (ctx != null && !ctx.Response.SendChunked) { … … 276 277 if (con != null) { 277 278 _con = con; 278 return GameManager.Instance.adminTools.GetAdminToolsClientInfo (_con.SteamID.ToString ()) 279 .PermissionLevel; 279 return GameManager.Instance.adminTools.GetUserPermissionLevel (_con.SteamID.ToString ()); 280 280 } 281 281 } … … 297 297 WebConnection con = connectionHandler.LogIn (id, _req.RemoteEndPoint.Address); 298 298 _con = con; 299 int level = GameManager.Instance.adminTools.GetAdminToolsClientInfo (id.ToString ()) 300 .PermissionLevel; 299 int level = GameManager.Instance.adminTools.GetUserPermissionLevel (id.ToString ()); 301 300 Log.Out ("Steam OpenID login from {0} with ID {1}, permission level {2}", 302 301 _req.RemoteEndPoint.ToString (), con.SteamID, level);
Note:
See TracChangeset
for help on using the changeset viewer.