diff options
Diffstat (limited to 'ShiftOS.WinForms')
| -rw-r--r-- | ShiftOS.WinForms/Applications/Terminal.cs | 5 | ||||
| -rw-r--r-- | ShiftOS.WinForms/Commands.cs | 19 |
2 files changed, 24 insertions, 0 deletions
diff --git a/ShiftOS.WinForms/Applications/Terminal.cs b/ShiftOS.WinForms/Applications/Terminal.cs index 133858c..0a123d6 100644 --- a/ShiftOS.WinForms/Applications/Terminal.cs +++ b/ShiftOS.WinForms/Applications/Terminal.cs @@ -361,6 +361,11 @@ namespace ShiftOS.WinForms.Applications IsInRemoteSystem = true; RemoteGuid = msg.GUID; } + else if(msg.Name == "trm_handshake_stop") + { + IsInRemoteSystem = false; + RemoteGuid = ""; + } }; } diff --git a/ShiftOS.WinForms/Commands.cs b/ShiftOS.WinForms/Commands.cs index 2f95fe2..2d297f5 100644 --- a/ShiftOS.WinForms/Commands.cs +++ b/ShiftOS.WinForms/Commands.cs @@ -42,6 +42,25 @@ namespace ShiftOS.WinForms [Namespace("trm")] public static class TerminalExtensions { + [Command("exit")] + public static bool StopRemoting() + { + if(TerminalBackend.IsForwardingConsoleWrites == true) + { + ServerManager.SendMessage("trm_handshake_stop", $@"{{ + guid: ""{TerminalBackend.ForwardGUID}"" +}}"); + Console.WriteLine("Goodbye!"); + } + else + { + return false; + } + + return true; + } + + [Command("setpass", true)] [RequiresArgument("pass")] public static bool setPass(Dictionary<string, object> args) |
