aboutsummaryrefslogtreecommitdiff
path: root/ShiftOS.WinForms/Commands.cs
diff options
context:
space:
mode:
authorMichael <[email protected]>2017-01-21 16:23:10 -0500
committerMichael <[email protected]>2017-01-21 16:23:10 -0500
commita531cefa00923cc89fe94750bb1b4af12a50df93 (patch)
tree7c56b04db83b6d21351fff375e4311a264f16c12 /ShiftOS.WinForms/Commands.cs
parent5c9629c4c61d823dfc49693355072b38c09ffb7a (diff)
downloadshiftos_thereturn-a531cefa00923cc89fe94750bb1b4af12a50df93.tar.gz
shiftos_thereturn-a531cefa00923cc89fe94750bb1b4af12a50df93.tar.bz2
shiftos_thereturn-a531cefa00923cc89fe94750bb1b4af12a50df93.zip
Terminal remote control!
Diffstat (limited to 'ShiftOS.WinForms/Commands.cs')
-rw-r--r--ShiftOS.WinForms/Commands.cs24
1 files changed, 24 insertions, 0 deletions
diff --git a/ShiftOS.WinForms/Commands.cs b/ShiftOS.WinForms/Commands.cs
index a0a1692..ba0ed31 100644
--- a/ShiftOS.WinForms/Commands.cs
+++ b/ShiftOS.WinForms/Commands.cs
@@ -32,12 +32,36 @@ using System.IO;
using System.Diagnostics;
using System.Runtime.InteropServices;
using System.Threading;
+using Newtonsoft.Json;
/// <summary>
/// Coherence commands.
/// </summary>
namespace ShiftOS.WinForms
{
+ [Namespace("trm")]
+ public static class TerminalExtensions
+ {
+ [Command("setpass", true)]
+ [RequiresArgument("pass")]
+ public static bool setPass(Dictionary<string, object> args)
+ {
+ SaveSystem.CurrentSave.Password = args["pass"] as string;
+ return true;
+ }
+
+ [Command("remote", "username:,sysname:,pass:", "Allows you to control a remote system on the multi-user domain given a username, password and system name.")]
+ [RequiresArgument("username")]
+ [RequiresArgument("sysname")]
+ [RequiresArgument("pass")]
+ public static bool RemoteControl(Dictionary<string, object> args)
+ {
+ ServerManager.SendMessage("trm_handshake_request", JsonConvert.SerializeObject(args));
+ return true;
+ }
+ }
+
+
[Namespace("coherence")]
[RequiresUpgrade("kernel_coherence")]
public static class CoherenceCommands