aboutsummaryrefslogtreecommitdiff
path: root/ShiftOS.Server/RemoteTerminal.cs
diff options
context:
space:
mode:
Diffstat (limited to 'ShiftOS.Server/RemoteTerminal.cs')
-rw-r--r--ShiftOS.Server/RemoteTerminal.cs22
1 files changed, 22 insertions, 0 deletions
diff --git a/ShiftOS.Server/RemoteTerminal.cs b/ShiftOS.Server/RemoteTerminal.cs
index d28cf8a..6742e44 100644
--- a/ShiftOS.Server/RemoteTerminal.cs
+++ b/ShiftOS.Server/RemoteTerminal.cs
@@ -26,6 +26,28 @@ namespace ShiftOS.Server
}
}
+ [MudRequest("trm_invcmd")]
+ public static void InvokeCommand(string guid, object contents)
+ {
+ Console.WriteLine("Before arg check");
+ var args = contents as Dictionary<string, object>;
+ if (args["guid"] != null && args["command"] != null)
+ {
+ Console.WriteLine("arg check finished");
+ string cmd = args["command"] as string;
+ string cGuid = args["guid"] as string;
+ Console.WriteLine("Before dispatch");
+ Program.ClientDispatcher.Server.DispatchTo(new Guid(cGuid), new NetObject("trminvoke", new ServerMessage
+ {
+ Name = "trm_invokecommand",
+ GUID = "server",
+ Contents = cmd
+ }));
+ Console.WriteLine("After dispatch");
+ }
+
+ }
+
[MudRequest("trm_handshake_request")]
public static void RequestHandshake(string guid, object contents)
{