From 3bf69aa5a3f76610412801857245a7aa6408e091 Mon Sep 17 00:00:00 2001 From: Melanie Date: Fri, 8 Jan 2010 11:02:39 +0000 Subject: Change ConsoleClient to allow quoted values to be passed through. This allows setting the login message remotely on the user server console --- OpenSim/ConsoleClient/ConsoleClient.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'OpenSim') diff --git a/OpenSim/ConsoleClient/ConsoleClient.cs b/OpenSim/ConsoleClient/ConsoleClient.cs index 783adef..d195d25 100644 --- a/OpenSim/ConsoleClient/ConsoleClient.cs +++ b/OpenSim/ConsoleClient/ConsoleClient.cs @@ -82,7 +82,13 @@ namespace OpenSim.ConsoleClient private static void SendCommand(string module, string[] cmd) { - string sendCmd = String.Join(" ", cmd); + string sendCmd = cmd[0]; + if (cmd.Length > 1) + { + Array.Copy(cmd, 1, cmd, 0, cmd.Length-1); + Array.Resize(ref cmd, cmd.Length-1); + sendCmd += "\"" + String.Join("\" \"", cmd) + "\""; + } Requester.MakeRequest("http://"+m_Host+":"+m_Port.ToString()+"/SessionCommand/", String.Format("ID={0}&COMMAND={1}", m_SessionID, sendCmd), CommandReply); } -- cgit v1.1