From 650d761c06149b59148e57e90cb47dcfa8d65f6a Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Thu, 8 Mar 2012 02:17:45 +0000 Subject: Display help commander topics in capitalized form - the commands themselves are still lowercase. Also convert the estate commands to simply AddCommand() calls so that commands from two different modules can be placed in the same category --- .../World/Estate/EstateManagementCommands.cs | 47 ++++------------------ 1 file changed, 7 insertions(+), 40 deletions(-) (limited to 'OpenSim/Region/CoreModules/World/Estate/EstateManagementCommands.cs') diff --git a/OpenSim/Region/CoreModules/World/Estate/EstateManagementCommands.cs b/OpenSim/Region/CoreModules/World/Estate/EstateManagementCommands.cs index 0375c4f..18cdda5 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."); - - m_commander.RegisterCommand("show", showCommand); + consoleSetTerrainHeights); - 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; -- cgit v1.1