From 732cd838b1ce2bc5d2c312f510818fd63db76be4 Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Thu, 5 Feb 2009 21:35:59 +0000 Subject: * Make existing module commanders register as help topics * Typing help will now give a list of these topics at the top (as well as the rest of the current help stuff) * Typing help will give information about commands specific to that topic --- OpenSim/Region/Application/OpenSim.cs | 102 ++++++++++++++++-------------- OpenSim/Region/Application/OpenSimBase.cs | 12 +++- 2 files changed, 66 insertions(+), 48 deletions(-) (limited to 'OpenSim/Region/Application') diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index ac6a5c1..33621a9 100644 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs @@ -496,6 +496,7 @@ namespace OpenSim case "reset": Reset(cmdparams); break; + case "predecode-j2k": if (cmdparams.Length > 0) { @@ -661,53 +662,62 @@ namespace OpenSim { base.ShowHelp(helpArgs); - m_console.Notice("alert - send alert to a designated user or all users."); - m_console.Notice(" alert [First] [Last] [Message] - send an alert to a user. Case sensitive."); - m_console.Notice(" alert general [Message] - send an alert to all users."); - m_console.Notice("backup - persist simulator objects to the database ahead of the normal schedule."); - m_console.Notice("clear-assets - clear the asset cache"); - m_console.Notice("create-region - create a new region"); - m_console.Notice("change-region - select the region that single region commands operate upon."); - m_console.Notice("command-script [filename] - Execute command in a file."); - m_console.Notice("debug - debugging commands"); - m_console.Notice(" debug packet 0..255 - print incoming/outgoing packets (0=off)"); - m_console.Notice(" debug scene [scripting] [collision] [physics] - Enable/Disable debug stuff, each can be True/False"); - m_console.Notice("edit-scale [prim name] [x] [y] [z] - resize given prim"); - m_console.Notice("export-map [filename] - save image of world map"); - m_console.Notice("force-update - force an update of prims in the scene"); - m_console.Notice("restart - disconnects all clients and restarts the sims in the instance."); - m_console.Notice("remove-region [name] - remove a region"); - m_console.Notice("delete-region [name] - delete a region and its associated region file"); - m_console.Notice("load-xml [filename] - load prims from XML (DEPRECATED)"); - m_console.Notice("save-xml [filename] - save prims to XML (DEPRECATED)"); - m_console.Notice("save-xml2 [filename] - save prims to XML using version 2 format"); - m_console.Notice("load-xml2 [filename] - load prims from XML using version 2 format"); - m_console.Notice("load-oar [filename] - load an OpenSimulator region archive. This replaces everything in the current region."); - m_console.Notice("save-oar [filename] - Save the current region to an OpenSimulator region archive."); - m_console.Notice("script - manually trigger scripts? or script commands?"); - m_console.Notice("show assets - show state of asset cache."); - m_console.Notice("show modules - shows info about loaded modules."); - m_console.Notice("show queues - show packet queues length for all clients."); - m_console.Notice("show regions - show running region information."); - m_console.Notice("show users - show info about connected users (only root agents)."); - m_console.Notice("show users full - show info about connected users (root and child agents)."); - m_console.Notice("config set section field value - set a config value"); - m_console.Notice("config get section field - get a config value"); - m_console.Notice("config save - save OpenSim.ini"); - m_console.Notice("terrain help - show help for terrain commands."); - m_console.Notice("login-enable - Allows login at sim level"); - m_console.Notice("login-disable - Disable login at sim level"); - m_console.Notice("login-status - Show the actual login status"); - m_console.Notice("predecode-j2k - Precache assets,decode j2k layerdata, First parameter is threads to use"); - - ShowPluginCommandsHelp(CombineParams(helpArgs, 0), m_console); - - if (ConfigurationSettings.Standalone) - { - m_console.Notice(""); - m_console.Notice("create user - adds a new user."); - m_console.Notice("reset user password - reset a user's password."); + if (helpArgs.Length == 0) + { + m_console.Notice("alert - send alert to a designated user or all users."); + m_console.Notice(" alert [First] [Last] [Message] - send an alert to a user. Case sensitive."); + m_console.Notice(" alert general [Message] - send an alert to all users."); + m_console.Notice("backup - persist simulator objects to the database ahead of the normal schedule."); + m_console.Notice("clear-assets - clear the asset cache"); + m_console.Notice("create-region - create a new region"); + m_console.Notice("change-region - select the region that single region commands operate upon."); + m_console.Notice("command-script [filename] - Execute command in a file."); + m_console.Notice("debug - debugging commands"); + m_console.Notice(" debug packet 0..255 - print incoming/outgoing packets (0=off)"); + m_console.Notice(" debug scene [scripting] [collision] [physics] - Enable/Disable debug stuff, each can be True/False"); + m_console.Notice("edit-scale [prim name] [x] [y] [z] - resize given prim"); + m_console.Notice("export-map [filename] - save image of world map"); + m_console.Notice("force-update - force an update of prims in the scene"); + m_console.Notice("restart - disconnects all clients and restarts the sims in the instance."); + m_console.Notice("remove-region [name] - remove a region"); + m_console.Notice("delete-region [name] - delete a region and its associated region file"); + m_console.Notice("load-xml [filename] - load prims from XML (DEPRECATED)"); + m_console.Notice("save-xml [filename] - save prims to XML (DEPRECATED)"); + m_console.Notice("save-xml2 [filename] - save prims to XML using version 2 format"); + m_console.Notice("load-xml2 [filename] - load prims from XML using version 2 format"); + m_console.Notice("load-oar [filename] - load an OpenSimulator region archive. This replaces everything in the current region."); + m_console.Notice("save-oar [filename] - Save the current region to an OpenSimulator region archive."); + m_console.Notice("script - manually trigger scripts? or script commands?"); + m_console.Notice("show assets - show state of asset cache."); + m_console.Notice("show modules - shows info about loaded modules."); + m_console.Notice("show queues - show packet queues length for all clients."); + m_console.Notice("show regions - show running region information."); + m_console.Notice("show users - show info about connected users (only root agents)."); + m_console.Notice("show users full - show info about connected users (root and child agents)."); + m_console.Notice("config set section field value - set a config value"); + m_console.Notice("config get section field - get a config value"); + m_console.Notice("config save - save OpenSim.ini"); + m_console.Notice("login-enable - Allows login at sim level"); + m_console.Notice("login-disable - Disable login at sim level"); + m_console.Notice("login-status - Show the actual login status"); + m_console.Notice("predecode-j2k - Precache assets,decode j2k layerdata, First parameter is threads to use"); + ShowPluginCommandsHelp(CombineParams(helpArgs, 0), m_console); + + if (ConfigurationSettings.Standalone) + { + m_console.Notice(""); + m_console.Notice("create user - adds a new user."); + m_console.Notice("reset user password - reset a user's password."); + } } + else + { + ICommander moduleCommander = SceneManager.CurrentOrFirstScene.GetCommander(helpArgs[0]); + if (moduleCommander != null) + { + m_console.Notice(moduleCommander.Help); + } + } } // see BaseOpenSimServer diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs index aca1829..89f16d6 100644 --- a/OpenSim/Region/Application/OpenSimBase.cs +++ b/OpenSim/Region/Application/OpenSimBase.cs @@ -59,7 +59,7 @@ namespace OpenSim private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); protected string proxyUrl; - protected int proxyOffset = 0; + protected int proxyOffset = 0; /// /// The file used to load and save prim backup xml if no filename has been specified @@ -158,7 +158,15 @@ namespace OpenSim loader.Load("/OpenSim/Startup"); m_plugins = loader.Plugins; } - + + protected override List GetHelpTopics() + { + List topics = base.GetHelpTopics(); + topics.AddRange(SceneManager.CurrentOrFirstScene.GetCommanders().Keys); + + return topics; + } + /// /// Performs startup specific to this region server, including initialization of the scene /// such as loading configuration from disk. -- cgit v1.1