From 749c3fef8ad2d3af97fcd9ab9c72740675e46715 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Thu, 8 Mar 2012 01:51:37 +0000 Subject: Change "help" to display categories/module list then "help " to display commands in a category. This is to deal with the hundred lines of command splurge when one previously typed "help" Modelled somewhat on the mysql console One can still type help to get per command help at any point. Categories capitalized to avoid conflict with the all-lowercase commands (except for commander system, as of yet). Does not affect command parsing or any other aspects of the console apart from the help system. Backwards compatible with existing modules. --- OpenSim/Region/Application/OpenSim.cs | 87 +++++++++++++++-------------------- 1 file changed, 37 insertions(+), 50 deletions(-) (limited to 'OpenSim/Region/Application/OpenSim.cs') diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index 145875b..a46ce7f 100644 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs @@ -225,12 +225,12 @@ namespace OpenSim /// private void RegisterConsoleCommands() { - m_console.Commands.AddCommand("region", false, "force update", + m_console.Commands.AddCommand("Regions", false, "force update", "force update", "Force the update of all objects on clients", HandleForceUpdate); - m_console.Commands.AddCommand("region", false, "debug packet", + m_console.Commands.AddCommand("Comms", false, "debug packet", "debug packet [ ]", "Turn on packet debugging", "If level > 255 then all incoming and outgoing packets are logged.\n" @@ -242,7 +242,7 @@ namespace OpenSim + "If an avatar name is given then only packets from that avatar are logged", Debug); - m_console.Commands.AddCommand("region", false, "debug http", + m_console.Commands.AddCommand("Comms", false, "debug http", "debug http ", "Turn on inbound http request debugging for everything except the event queue (see debug eq).", "If level >= 2 then the handler used to service the request is logged.\n" @@ -250,37 +250,37 @@ namespace OpenSim + "If level <= 0 then no extra http logging is done.\n", Debug); - m_console.Commands.AddCommand("region", false, "debug teleport", "debug teleport", "Toggle teleport route debugging", Debug); + m_console.Commands.AddCommand("Comms", false, "debug teleport", "debug teleport", "Toggle teleport route debugging", Debug); - m_console.Commands.AddCommand("region", false, "debug scene", + m_console.Commands.AddCommand("Regions", false, "debug scene", "debug scene ", "Turn on scene debugging", Debug); - m_console.Commands.AddCommand("region", false, "change region", + m_console.Commands.AddCommand("Regions", false, "change region", "change region ", "Change current console region", ChangeSelectedRegion); - m_console.Commands.AddCommand("region", false, "save xml", + m_console.Commands.AddCommand("Archiving", false, "save xml", "save xml", "Save a region's data in XML format", SaveXml); - m_console.Commands.AddCommand("region", false, "save xml2", + m_console.Commands.AddCommand("Archiving", false, "save xml2", "save xml2", "Save a region's data in XML2 format", SaveXml2); - m_console.Commands.AddCommand("region", false, "load xml", + m_console.Commands.AddCommand("Archiving", false, "load xml", "load xml [-newIDs [ ]]", "Load a region's data from XML format", LoadXml); - m_console.Commands.AddCommand("region", false, "load xml2", + m_console.Commands.AddCommand("Archiving", false, "load xml2", "load xml2", "Load a region's data from XML2 format", LoadXml2); - m_console.Commands.AddCommand("region", false, "save prims xml2", + m_console.Commands.AddCommand("Archiving", false, "save prims xml2", "save prims xml2 [ ]", "Save named prim to XML2", SavePrimsXml2); - m_console.Commands.AddCommand("region", false, "load oar", + m_console.Commands.AddCommand("Archiving", false, "load oar", "load oar [--merge] [--skip-assets] []", "Load a region's data from an OAR archive.", "--merge will merge the OAR with the existing scene." + Environment.NewLine @@ -289,7 +289,7 @@ namespace OpenSim + " If this is not given then the command looks for an OAR named region.oar in the current directory.", LoadOar); - m_console.Commands.AddCommand("region", false, "save oar", + m_console.Commands.AddCommand("Archiving", false, "save oar", //"save oar [-v|--version=] [-p|--profile=] []", "save oar [-h|--home=] [--noassets] [--publish] [--perm=] []", "Save a region's data to an OAR archive.", @@ -306,54 +306,54 @@ namespace OpenSim + " If this is not given then the oar is saved to region.oar in the current directory.", SaveOar); - m_console.Commands.AddCommand("region", false, "edit scale", + m_console.Commands.AddCommand("Regions", false, "edit scale", "edit scale ", "Change the scale of a named prim", HandleEditScale); - m_console.Commands.AddCommand("region", false, "kick user", + m_console.Commands.AddCommand("Users", false, "kick user", "kick user [message]", "Kick a user off the simulator", KickUserCommand); - m_console.Commands.AddCommand("region", false, "show users", + m_console.Commands.AddCommand("Users", false, "show users", "show users [full]", "Show user data for users currently on the region", "Without the 'full' option, only users actually on the region are shown." + " With the 'full' option child agents of users in neighbouring regions are also shown.", HandleShow); - m_console.Commands.AddCommand("region", false, "show connections", + m_console.Commands.AddCommand("Comms", false, "show connections", "show connections", "Show connection data", HandleShow); - m_console.Commands.AddCommand("region", false, "show circuits", + m_console.Commands.AddCommand("Comms", false, "show circuits", "show circuits", "Show agent circuit data", HandleShow); - m_console.Commands.AddCommand("region", false, "show http-handlers", + m_console.Commands.AddCommand("Comms", false, "show http-handlers", "show http-handlers", "Show all registered http handlers", HandleShow); - m_console.Commands.AddCommand("region", false, "show pending-objects", + m_console.Commands.AddCommand("Comms", false, "show pending-objects", "show pending-objects", "Show # of objects on the pending queues of all scene viewers", HandleShow); - m_console.Commands.AddCommand("region", false, "show modules", + m_console.Commands.AddCommand("General", false, "show modules", "show modules", "Show module data", HandleShow); - m_console.Commands.AddCommand("region", false, "show regions", + m_console.Commands.AddCommand("Regions", false, "show regions", "show regions", "Show region data", HandleShow); - m_console.Commands.AddCommand("region", false, "show ratings", + m_console.Commands.AddCommand("Regions", false, "show ratings", "show ratings", "Show rating data", HandleShow); - m_console.Commands.AddCommand("region", false, "backup", + m_console.Commands.AddCommand("Regions", false, "backup", "backup", "Persist currently unsaved object changes immediately instead of waiting for the normal persistence call.", RunCommand); - m_console.Commands.AddCommand("region", false, "create region", + m_console.Commands.AddCommand("Regions", false, "create region", "create region [\"region name\"] ", "Create a new region.", "The settings for \"region name\" are read from . Paths specified with are relative to your Regions directory, unless an absolute path is given." @@ -362,62 +362,57 @@ namespace OpenSim + "If does not exist, it will be created.", HandleCreateRegion); - m_console.Commands.AddCommand("region", false, "restart", + m_console.Commands.AddCommand("Regions", false, "restart", "restart", "Restart all sims in this instance", RunCommand); - m_console.Commands.AddCommand("region", false, "config set", + m_console.Commands.AddCommand("General", false, "config set", "config set
", "Set a config option. In most cases this is not useful since changed parameters are not dynamically reloaded. Neither do changed parameters persist - you will have to change a config file manually and restart.", HandleConfig); - m_console.Commands.AddCommand("region", false, "config get", + m_console.Commands.AddCommand("General", false, "config get", "config get [
] []", "Synonym for config show", HandleConfig); - m_console.Commands.AddCommand("region", false, "config show", + m_console.Commands.AddCommand("General", false, "config show", "config show [
] []", "Show config information", "If neither section nor field are specified, then the whole current configuration is printed." + Environment.NewLine + "If a section is given but not a field, then all fields in that section are printed.", HandleConfig); - m_console.Commands.AddCommand("region", false, "config save", + m_console.Commands.AddCommand("General", false, "config save", "config save ", "Save current configuration to a file at the given path", HandleConfig); - m_console.Commands.AddCommand("region", false, "command-script", + m_console.Commands.AddCommand("General", false, "command-script", "command-script