- Timestamp:
- Jul 24, 2014, 3:25:58 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
binary-improvements/7dtd-server-fixes/src/AdminToolsStuff.cs
r86 r103 6 6 public static string[] GetAllowedCommandsList (AdminTools admTools, string _steamID) 7 7 { 8 AdminToolsClientInfo tmpInfo = admTools.GetClientCommandInfo (_steamID);9 10 List<AdminToolsCommandPermissions> perms = admTools.commandPermissions;11 8 List<string> allowed = new List<string> (); 12 9 13 ConsoleSdtd console = ConnectionManager.Instance.gameManager.m_GUIConsole; 10 try { 11 AdminToolsClientInfo tmpInfo = admTools.GetClientCommandInfo (_steamID); 14 12 15 foreach (AdminToolsCommandPermissions atcp in perms) { 16 if (tmpInfo.SteamID != null && tmpInfo.SteamID.Length > 0) { 17 if ((atcp.PermissionLevel >= tmpInfo.PermissionLevel) || (atcp.PermissionLevel >= 1000)) { 18 addAllowed (console, allowed, atcp.Command); 19 } 20 } else { 21 if (atcp.PermissionLevel >= 1000) { 22 addAllowed (console, allowed, atcp.Command); 13 List<AdminToolsCommandPermissions> perms = admTools.commandPermissions; 14 ConsoleSdtd console = CommonMappingFunctions.GetGameManager ().m_GUIConsole; 15 16 foreach (AdminToolsCommandPermissions atcp in perms) { 17 if (tmpInfo.SteamID != null && tmpInfo.SteamID.Length > 0) { 18 if ((atcp.PermissionLevel >= tmpInfo.PermissionLevel) || (atcp.PermissionLevel >= 1000)) { 19 addAllowed (console, allowed, atcp.Command); 20 } 21 } else { 22 if (atcp.PermissionLevel >= 1000) { 23 addAllowed (console, allowed, atcp.Command); 24 } 23 25 } 24 26 } 27 } catch (Exception e) { 28 Log.Out ("Error in GetAllowedCommandsList: " + e); 25 29 } 30 26 31 27 32 return allowed.ToArray ();
Note:
See TracChangeset
for help on using the changeset viewer.