From 5e4d6cab00cb29cd088ab7b62ab13aff103b64cb Mon Sep 17 00:00:00 2001 From: onefang Date: Sun, 19 May 2019 21:24:15 +1000 Subject: Dump OpenSim 0.9.0.1 into it's own branch. --- OpenSim/Framework/Console/CommandConsole.cs | 44 ++++++++++++++--------------- 1 file changed, 22 insertions(+), 22 deletions(-) (limited to 'OpenSim/Framework/Console/CommandConsole.cs') diff --git a/OpenSim/Framework/Console/CommandConsole.cs b/OpenSim/Framework/Console/CommandConsole.cs index 0f68afe..52360b4 100644 --- a/OpenSim/Framework/Console/CommandConsole.cs +++ b/OpenSim/Framework/Console/CommandConsole.cs @@ -52,27 +52,27 @@ namespace OpenSim.Framework.Console /// The module from which this command comes /// public string module; - + /// /// Whether the module is shared /// public bool shared; - + /// /// Very short BNF description /// public string help_text; - + /// /// Longer one line help text /// public string long_help; - + /// /// Full descriptive help for this command /// public string descriptive_help; - + /// /// The method to invoke for this command /// @@ -83,8 +83,8 @@ namespace OpenSim.Framework.Console = "To enter an argument that contains spaces, surround the argument with double quotes.\nFor example, show object name \"My long object name\"\n"; public const string ItemHelpText -= @"For more information, type 'help all' to get a list of all commands, - or type help ' where is one of the following:"; + = @"For more information, type 'help all' to get a list of all commands, + or type help ' where is one of the following:"; /// /// Commands organized by keyword in a tree @@ -106,7 +106,7 @@ namespace OpenSim.Framework.Console { List help = new List(); List helpParts = new List(cmd); - + // Remove initial help keyword helpParts.RemoveAt(0); @@ -154,7 +154,7 @@ namespace OpenSim.Framework.Console return help; } - + /// /// See if we can find the requested command in order to display longer help /// @@ -171,23 +171,23 @@ namespace OpenSim.Framework.Console help.Insert(0, ItemHelpText); return help; } - + Dictionary dict = tree; while (helpParts.Count > 0) { string helpPart = helpParts[0]; - + if (!dict.ContainsKey(helpPart)) break; - + //m_log.Debug("Found {0}", helpParts[0]); - + if (dict[helpPart] is Dictionary) - dict = (Dictionary)dict[helpPart]; - + dict = (Dictionary)dict[helpPart]; + helpParts.RemoveAt(0); } - + // There was a command for the given help string if (dict.ContainsKey(String.Empty)) { @@ -200,14 +200,14 @@ namespace OpenSim.Framework.Console // If we do have some descriptive help then insert a spacing line before for readability. if (descriptiveHelp != string.Empty) help.Add(string.Empty); - + help.Add(commandInfo.descriptive_help); } else { help.Add(string.Format("No help is available for {0}", originalHelpRequest)); } - + return help; } @@ -268,7 +268,7 @@ namespace OpenSim.Framework.Console // } // return result; // } - + /// /// Add a command to those which can be invoked from the console. /// @@ -299,7 +299,7 @@ namespace OpenSim.Framework.Console string[] parts = Parser.Parse(command); Dictionary current = tree; - + foreach (string part in parts) { if (current.ContainsKey(part)) @@ -326,7 +326,7 @@ namespace OpenSim.Framework.Console return; } - + info = new CommandInfo(); info.module = module; info.shared = shared; @@ -471,7 +471,7 @@ namespace OpenSim.Framework.Console return null; } - + public bool HasCommand(string command) { string[] result; -- cgit v1.1