aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Servers
diff options
context:
space:
mode:
authorJustin Clarke Casey2009-02-05 21:35:59 +0000
committerJustin Clarke Casey2009-02-05 21:35:59 +0000
commit732cd838b1ce2bc5d2c312f510818fd63db76be4 (patch)
tree66617238b33626990d7eb2d9f5da041f3e57eaa6 /OpenSim/Framework/Servers
parent* Use the commander name to register module commanders instead of providing t... (diff)
downloadopensim-SC_OLD-732cd838b1ce2bc5d2c312f510818fd63db76be4.zip
opensim-SC_OLD-732cd838b1ce2bc5d2c312f510818fd63db76be4.tar.gz
opensim-SC_OLD-732cd838b1ce2bc5d2c312f510818fd63db76be4.tar.bz2
opensim-SC_OLD-732cd838b1ce2bc5d2c312f510818fd63db76be4.tar.xz
* 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 <topic> will give information about commands specific to that topic
Diffstat (limited to 'OpenSim/Framework/Servers')
-rw-r--r--OpenSim/Framework/Servers/BaseOpenSimServer.cs28
1 files changed, 24 insertions, 4 deletions
diff --git a/OpenSim/Framework/Servers/BaseOpenSimServer.cs b/OpenSim/Framework/Servers/BaseOpenSimServer.cs
index 4d82020..473991a 100644
--- a/OpenSim/Framework/Servers/BaseOpenSimServer.cs
+++ b/OpenSim/Framework/Servers/BaseOpenSimServer.cs
@@ -104,6 +104,16 @@ namespace OpenSim.Framework.Servers
104 /// Should be overriden and referenced by descendents if they need to perform extra shutdown processing 104 /// Should be overriden and referenced by descendents if they need to perform extra shutdown processing
105 /// </summary> 105 /// </summary>
106 public virtual void ShutdownSpecific() {} 106 public virtual void ShutdownSpecific() {}
107
108 /// <summary>
109 /// Provides a list of help topics that are available. Overriding classes should append their topics to the
110 /// information returned when the base method is called.
111 /// </summary>
112 ///
113 /// <returns>
114 /// A list of strings that represent different help topics on which more information is available
115 /// </returns>
116 protected virtual List<string> GetHelpTopics() { return new List<string>(); }
107 117
108 /// <summary> 118 /// <summary>
109 /// Print statistics to the logfile, if they are active 119 /// Print statistics to the logfile, if they are active
@@ -310,11 +320,20 @@ namespace OpenSim.Framework.Servers
310 /// <param name="helpArgs"></param> 320 /// <param name="helpArgs"></param>
311 protected virtual void ShowHelp(string[] helpArgs) 321 protected virtual void ShowHelp(string[] helpArgs)
312 { 322 {
323 Notice("");
324
313 if (helpArgs.Length == 0) 325 if (helpArgs.Length == 0)
314 { 326 {
315 Notice(""); 327 List<string> helpTopics = GetHelpTopics();
316 // TODO: not yet implemented 328
317 //Notice("help [command] - display general help or specific command help. Try help help for more info."); 329 if (helpTopics.Count > 0)
330 {
331 Notice(
332 "As well as the help information below, you can also type help <topic> to get more information on the following areas:");
333 Notice(string.Format(" {0}", string.Join(", ", helpTopics.ToArray())));
334 Notice("");
335 }
336
318 Notice("quit - equivalent to shutdown."); 337 Notice("quit - equivalent to shutdown.");
319 338
320 Notice("set log level [level] - change the console logging level only. For example, off or debug."); 339 Notice("set log level [level] - change the console logging level only. For example, off or debug.");
@@ -326,7 +345,8 @@ namespace OpenSim.Framework.Servers
326 Notice("show threads - list tracked threads"); 345 Notice("show threads - list tracked threads");
327 Notice("show uptime - show server startup time and uptime."); 346 Notice("show uptime - show server startup time and uptime.");
328 Notice("show version - show server version."); 347 Notice("show version - show server version.");
329 Notice("shutdown - shutdown the server.\n"); 348 Notice("shutdown - shutdown the server.");
349 Notice("");
330 350
331 return; 351 return;
332 } 352 }