dev/verify-console-client.cs

A small editor-side script to run console commands on a remote client in a two-client isolated session. It checks that this is a remote (non-host, active) client, generates two GUIDs, runs several ConsoleSystem commands including a superuser_request and returns a short result object with IDs and connection info.

NetworkingHttp Calls
// Run on client A of a two-client isolated editor session before configuring owners.
if ( Networking.IsHost || !Networking.IsActive ) throw new InvalidOperationException( "Connected remote lab client required." );
var help = Guid.NewGuid();
var denied = Guid.NewGuid();
ConsoleSystem.Run( "admin", "help" );
ConsoleSystem.Run( "superuser_request", help.ToString( "N" ), "admin", "help", "version" );
ConsoleSystem.Run( "superuser_request", help.ToString( "N" ), "admin", "help", "version" );
ConsoleSystem.Run( "superuser_request", denied.ToString( "N" ), "admin", "user", Connection.Local.SteamId.ToString(), "group", "add", "owner" );
return new { Submitted = true, HelpRequest = help, DeniedRequest = denied, Caller = Connection.Local.SteamId.ToString(), Connection = Connection.Local.Id };