Clients can execute permitted console commands server-side now. The console commands have three different actions: the default action, one that's executed client-side when a client uses it, and one that's executed server-side when a clients requests it. If the client-side action is omitted, the client relays the command to the server as-is. If the third action is omitted, the server executes the default action.

This commit is contained in:
Joonas Rikkonen
2017-12-06 19:52:57 +02:00
parent 91a8e6d0c6
commit 9bc0931be5
8 changed files with 551 additions and 175 deletions
@@ -157,9 +157,10 @@ namespace Barotrauma.Networking
return rName;
}
public void SetPermissions(ClientPermissions permissions)
public void SetPermissions(ClientPermissions permissions, List<DebugConsole.Command> permittedConsoleCommands)
{
this.Permissions = permissions;
this.PermittedConsoleCommands = permittedConsoleCommands;
}
public void GivePermission(ClientPermissions permission)