Change ConsoleClient to allow quoted values to be passed through. This

allows setting the login message remotely on the user server console
mysql-performance
Melanie 2010-01-08 11:02:39 +00:00
parent bba557aff6
commit 3bf69aa5a3
1 changed files with 7 additions and 1 deletions

View File

@ -82,7 +82,13 @@ namespace OpenSim.ConsoleClient
private static void SendCommand(string module, string[] cmd) 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); Requester.MakeRequest("http://"+m_Host+":"+m_Port.ToString()+"/SessionCommand/", String.Format("ID={0}&COMMAND={1}", m_SessionID, sendCmd), CommandReply);
} }