Changeset 86 for binary-improvements/7dtd-server-fixes
- Timestamp:
- Jul 19, 2014, 1:17:49 PM (10 years ago)
- Location:
- binary-improvements/7dtd-server-fixes
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
binary-improvements/7dtd-server-fixes/src/AdminToolsStuff.cs
r84 r86 11 11 List<string> allowed = new List<string> (); 12 12 13 ConsoleSdtd console = ConnectionManager.Instance.gameManager.m_GUIConsole; 14 13 15 foreach (AdminToolsCommandPermissions atcp in perms) { 14 16 if (tmpInfo.SteamID != null && tmpInfo.SteamID.Length > 0) { 15 17 if ((atcp.PermissionLevel >= tmpInfo.PermissionLevel) || (atcp.PermissionLevel >= 1000)) { 16 a llowed.Add (atcp.Command);18 addAllowed (console, allowed, atcp.Command); 17 19 } 18 20 } else { 19 21 if (atcp.PermissionLevel >= 1000) { 20 a llowed.Add (atcp.Command);22 addAllowed (console, allowed, atcp.Command); 21 23 } 22 24 } … … 25 27 return allowed.ToArray (); 26 28 } 29 30 private static void addAllowed (ConsoleSdtd console, List<string> list, string cmd) 31 { 32 ConsoleCommand cc = console.getCommand (cmd); 33 if (cc != null) { 34 foreach (string ccName in cc.Names()) { 35 if (!list.Contains (ccName)) { 36 list.Add (ccName); 37 } 38 } 39 } else { 40 list.Add (cmd); 41 } 42 } 27 43 } 28 44
Note:
See TracChangeset
for help on using the changeset viewer.