From b6667e72243673b47e77a48a1e040d9ccf0ba2b0 Mon Sep 17 00:00:00 2001 From: Charles Krinke Date: Wed, 18 Jun 2008 21:07:40 +0000 Subject: Mantis#1567. Thank you kindly, Dmiles for a patch that addresses: Add a .Trim() that was forgotten in a previous patch titled: [PATCH] Adds an API for for plugins to create new Console commands and Help --- OpenSim/Region/Application/OpenSim.cs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index 64ea157..fa50bdc 100644 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs @@ -116,6 +116,7 @@ namespace OpenSim } PrintFileToConsole("startuplogo.txt"); + RegisterCmd("echoTest", RunEchoTest, "this echos your command args to see how they are parsed"); } protected ConsoleBase CreateConsole() @@ -133,6 +134,14 @@ namespace OpenSim #region Console Commands + private void RunEchoTest(string[] cmdparams) + { + for (int i = 0; i < cmdparams.Length; i++) + { + m_log.Info("[EchoTest]: "+cmdparams[i]+""); + } + } + /// /// /// @@ -801,7 +810,7 @@ namespace OpenSim { cmdParams = cmdParams.Substring(matchText.Length); } - m_commandDelegate(cmdParams.Split(new char[] { ' ' })); + m_commandDelegate(cmdParams.Trim().Split(new char[] { ' ' })); } /// -- cgit v1.1