From a3cd6c0e6045d12f0cb8c9355bcd50f12e367f3b Mon Sep 17 00:00:00 2001 From: Michael Date: Sat, 17 Jun 2017 21:03:27 -0400 Subject: Commands are parsed with a bash-style syntax by default --- ShiftOS_TheReturn/TerminalBackend.cs | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) (limited to 'ShiftOS_TheReturn/TerminalBackend.cs') diff --git a/ShiftOS_TheReturn/TerminalBackend.cs b/ShiftOS_TheReturn/TerminalBackend.cs index 1ca31e0..d60b675 100644 --- a/ShiftOS_TheReturn/TerminalBackend.cs +++ b/ShiftOS_TheReturn/TerminalBackend.cs @@ -92,30 +92,25 @@ namespace ShiftOS.Engine /// /// Invokes a ShiftOS terminal command. /// - /// The command's namespace. /// The command name. /// The command arguments. /// Whether the command should be sent through Remote Terminal Session (RTS). - public static void InvokeCommand(string ns, string command, Dictionary arguments, bool isRemote = false) + public static void InvokeCommand(string command, Dictionary arguments, bool isRemote = false) { try { - if (string.IsNullOrWhiteSpace(ns)) - return; - + bool commandWasClient = RunClient(command, arguments, isRemote); - bool commandWasClient = RunClient(ns, command, arguments, isRemote); - - if (!commandWasClient && !string.IsNullOrWhiteSpace(ns)) + if (!commandWasClient) { - Console.WriteLine("Error: Command not found."); + Console.WriteLine("{ERR_COMMANDNOTFOUND}"); } - CommandProcessed?.Invoke(ns + "." + command, JsonConvert.SerializeObject(arguments)); + CommandProcessed?.Invoke(command, JsonConvert.SerializeObject(arguments)); } catch (Exception ex) { - Console.WriteLine($"Command parse error: {ex.Message}"); // This shouldn't ever be called now + Console.WriteLine("{ERR_SYNTAXERROR}"); PrefixEnabled = true; } -- cgit v1.2.3