From 110438929c855aec8fe1a4cc0b01ccad7ee3807d Mon Sep 17 00:00:00 2001 From: Michael Date: Sun, 12 Feb 2017 10:51:53 -0500 Subject: More MUD refactoring (I'm almost done!) --- ShiftOS.Server/RemoteTerminal.cs | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'ShiftOS.Server/RemoteTerminal.cs') 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; + 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) { -- cgit v1.2.3