diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs index 27a58a425e..d3c1102fce 100644 --- a/OpenSim/Region/Application/OpenSimBase.cs +++ b/OpenSim/Region/Application/OpenSimBase.cs @@ -242,8 +242,10 @@ namespace OpenSim foreach (string topic in topics) { - m_console.Commands.AddCommand(topic, false, "help " + topic, - "help " + topic, + string capitalizedTopic = char.ToUpper(topic[0]) + topic.Substring(1); + + m_console.Commands.AddCommand(capitalizedTopic, false, "help " + capitalizedTopic, + "help " + capitalizedTopic, "Get help on plugin command '" + topic + "'", HandleCommanderHelp); // @@ -267,7 +269,7 @@ namespace OpenSim foreach (string command in commander.Commands.Keys) { - m_console.Commands.AddCommand(topic, false, + m_console.Commands.AddCommand(capitalizedTopic, false, topic + " " + command, topic + " " + commander.Commands[command].ShortHelp(), String.Empty, HandleCommanderCommand); @@ -286,7 +288,7 @@ namespace OpenSim // Only safe for the interactive console, since it won't // let us come here unless both scene and commander exist // - ICommander moduleCommander = SceneManager.CurrentOrFirstScene.GetCommander(cmd[1]); + ICommander moduleCommander = SceneManager.CurrentOrFirstScene.GetCommander(cmd[1].ToLower()); if (moduleCommander != null) m_console.Output(moduleCommander.Help); } diff --git a/OpenSim/Region/CoreModules/World/Estate/EstateManagementCommands.cs b/OpenSim/Region/CoreModules/World/Estate/EstateManagementCommands.cs index 0375c4f72e..18cdda5ba4 100644 --- a/OpenSim/Region/CoreModules/World/Estate/EstateManagementCommands.cs +++ b/OpenSim/Region/CoreModules/World/Estate/EstateManagementCommands.cs @@ -62,58 +62,25 @@ namespace OpenSim.Region.CoreModules.World.Estate { m_log.DebugFormat("[ESTATE MODULE]: Setting up estate commands for region {0}", m_module.Scene.RegionInfo.RegionName); - m_module.Scene.AddCommand("estate", m_module, "set terrain texture", + m_module.Scene.AddCommand("Regions", m_module, "set terrain texture", "set terrain texture [] []", "Sets the terrain to , if or are specified, it will only " + "set it on regions with a matching coordinate. Specify -1 in or to wildcard" + " that coordinate.", consoleSetTerrainTexture); - m_module.Scene.AddCommand("estate", m_module, "set terrain heights", + m_module.Scene.AddCommand("Regions", m_module, "set terrain heights", "set terrain heights [] []", "Sets the terrain texture heights on corner # to /, if or are specified, it will only " + "set it on regions with a matching coordinate. Specify -1 in or to wildcard" + " that coordinate. Corner # SW = 0, NW = 1, SE = 2, NE = 3.", - consoleSetTerrainHeights); - - Command showCommand - = new Command("show", CommandIntentions.COMMAND_STATISTICAL, ShowEstatesCommand, "Shows all estates on the simulator."); + consoleSetTerrainHeights); - m_commander.RegisterCommand("show", showCommand); - - m_module.Scene.RegisterModuleCommander(m_commander); - - m_module.Scene.EventManager.OnPluginConsole += EventManagerOnPluginConsole; + m_module.Scene.AddCommand( + "Estates", m_module, "estate show", "estate show", "Shows all estates on the simulator.", "", ShowEstatesCommand); } - public void Close() - { - m_module.Scene.EventManager.OnPluginConsole -= EventManagerOnPluginConsole; - m_module.Scene.UnregisterModuleCommander(m_commander.Name); - } - - /// - /// Processes commandline input. Do not call directly. - /// - /// Commandline arguments - protected void EventManagerOnPluginConsole(string[] args) - { - if (args[0] == "estate") - { - if (args.Length == 1) - { - m_commander.ProcessConsoleCommand("help", new string[0]); - return; - } - - string[] tmpArgs = new string[args.Length - 2]; - int i; - for (i = 2; i < args.Length; i++) - tmpArgs[i - 2] = args[i]; - - m_commander.ProcessConsoleCommand(args[1], tmpArgs); - } - } + public void Close() {} protected void consoleSetTerrainTexture(string module, string[] args) { @@ -201,7 +168,7 @@ namespace OpenSim.Region.CoreModules.World.Estate } } - protected void ShowEstatesCommand(Object[] args) + protected void ShowEstatesCommand(string module, string[] cmd) { StringBuilder report = new StringBuilder(); RegionInfo ri = m_module.Scene.RegionInfo; diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index ecadd24afd..9e59d5040b 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -596,7 +596,7 @@ namespace OpenSim.Region.Framework.Scenes #endregion Region Settings - MainConsole.Instance.Commands.AddCommand("estate", false, "reload estate", + MainConsole.Instance.Commands.AddCommand("Estates", false, "reload estate", "reload estate", "Reload the estate data", HandleReloadEstate);