From 9170361bee439ccd7f25030fcfb14701a4e8add0 Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Mon, 15 Sep 2008 17:45:48 +0000 Subject: * Complete refactoring accidentally left unfinished so that all server help requests flow through the ShowHelp() method --- OpenSim/Framework/Servers/BaseOpenSimServer.cs | 16 +-------- OpenSim/Grid/MessagingServer/Main.cs | 10 ++++-- OpenSim/Grid/UserServer/Main.cs | 15 +++++---- OpenSim/Region/Application/OpenSim.cs | 45 -------------------------- 4 files changed, 17 insertions(+), 69 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Framework/Servers/BaseOpenSimServer.cs b/OpenSim/Framework/Servers/BaseOpenSimServer.cs index e149a35..2018d55 100644 --- a/OpenSim/Framework/Servers/BaseOpenSimServer.cs +++ b/OpenSim/Framework/Servers/BaseOpenSimServer.cs @@ -229,22 +229,8 @@ namespace OpenSim.Framework.Servers switch (command) { case "help": + ShowHelp(cmdparams); Notice(""); - // TODO: help on commands not yet implemented - //Notice("help [command] - display general help or specific command help."); - Notice("quit - equivalent to shutdown."); - - Notice("set log level [level] - change the console logging level only. For example, off or debug."); - Notice("show info - show server information (e.g. startup path)."); - - if (m_stats != null) - Notice("show stats - show statistical information for this server"); - - Notice("show threads - list tracked threads"); - Notice("show uptime - show server startup time and uptime."); - Notice("show version - show server version."); - Notice("shutdown - shutdown the server.\n"); - break; case "set": diff --git a/OpenSim/Grid/MessagingServer/Main.cs b/OpenSim/Grid/MessagingServer/Main.cs index c73facb..c64c74e 100644 --- a/OpenSim/Grid/MessagingServer/Main.cs +++ b/OpenSim/Grid/MessagingServer/Main.cs @@ -150,15 +150,19 @@ namespace OpenSim.Grid.MessagingServer switch (cmd) { - case "help": - m_console.Notice("clear-cache - Clears region cache. Should be done when regions change position. The region cache gets stale after a while."); - break; case "clear-cache": int entries = msgsvc.ClearRegionCache(); m_console.Notice("Region cache cleared! Cleared " + entries.ToString() + " entries"); break; } } + + protected override void ShowHelp(string[] helpArgs) + { + base.ShowHelp(helpArgs); + + m_console.Notice("clear-cache - Clears region cache. Should be done when regions change position. The region cache gets stale after a while."); + } public override void Shutdown() { diff --git a/OpenSim/Grid/UserServer/Main.cs b/OpenSim/Grid/UserServer/Main.cs index 94e0728..0a64925 100644 --- a/OpenSim/Grid/UserServer/Main.cs +++ b/OpenSim/Grid/UserServer/Main.cs @@ -227,12 +227,6 @@ namespace OpenSim.Grid.UserServer switch (cmd) { - case "help": - m_console.Notice("create user - create a new user"); - m_console.Notice( - "logoff-user - logs off the specified user from the grid"); - break; - case "create": do_create(cmdparams[0]); break; @@ -309,6 +303,15 @@ namespace OpenSim.Grid.UserServer break; } } + + protected override void ShowHelp(string[] helpArgs) + { + base.ShowHelp(helpArgs); + + m_console.Notice("create user - create a new user"); + m_console.Notice( + "logoff-user - logs off the specified user from the grid"); + } public override void Shutdown() { diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index 12ef129..e48df81 100644 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs @@ -243,51 +243,6 @@ namespace OpenSim Debug(cmdparams); break; - case "help": - 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("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("set-time [x] - set the current scene time phase"); - m_console.Notice("show assets - show state of asset cache."); - 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("show modules - shows info about loaded modules."); - m_console.Notice("show regions - show running region information."); - 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."); - ShowPluginCommandsHelp(CombineParams(cmdparams, 0), m_console); - - if (m_sandbox) - { - m_console.Notice(""); - m_console.Notice("create user - adds a new user."); - m_console.Notice("reset user password - reset a user's password."); - } - - break; - case "save-xml": SaveXml(cmdparams); break; -- cgit v1.1