Changeset 404 for binary-improvements2/WebServer/src/WebAPI/APIs/Command.cs
- Timestamp:
- Feb 16, 2023, 3:50:53 PM (21 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
binary-improvements2/WebServer/src/WebAPI/APIs/Command.cs
r402 r404 25 25 26 26 if (string.IsNullOrEmpty (id)) { 27 bool first = true; 28 foreach (IConsoleCommand cc in SdtdConsole.Instance.GetCommands ()) { 29 if (!first) { 27 IList<IConsoleCommand> ccs = SdtdConsole.Instance.GetCommands (); 28 for (int i = 0; i < ccs.Count; i++) { 29 IConsoleCommand cc = ccs [i]; 30 31 if (i > 0) { 30 32 writer.WriteValueSeparator (); 31 33 } 32 33 first = false;34 34 35 35 writeCommandJson (ref writer, cc, permissionLevel); … … 81 81 _writer.WriteString (_command.GetHelp ()); 82 82 83 int commandPermissionLevel = GameManager.Instance.adminTools. GetCommandPermissionLevel (_command.GetCommands ());83 int commandPermissionLevel = GameManager.Instance.adminTools.Commands.GetCommandPermissionLevel (_command.GetCommands ()); 84 84 _writer.WriteRaw (jsonAllowedKey); 85 85 _writer.WriteBoolean (_userPermissionLevel <= commandPermissionLevel); … … 117 117 } 118 118 119 int commandPermissionLevel = GameManager.Instance.adminTools. GetCommandPermissionLevel (command.GetCommands ());119 int commandPermissionLevel = GameManager.Instance.adminTools.Commands.GetCommandPermissionLevel (command.GetCommands ()); 120 120 121 121 if (_context.PermissionLevel > commandPermissionLevel) {
Note:
See TracChangeset
for help on using the changeset viewer.