diff options
-rw-r--r-- | OpenSim/Framework/Console/CommandConsole.cs | 22 | ||||
-rw-r--r-- | OpenSim/Region/Application/OpenSimBase.cs | 11 |
2 files changed, 18 insertions, 15 deletions
diff --git a/OpenSim/Framework/Console/CommandConsole.cs b/OpenSim/Framework/Console/CommandConsole.cs index 2bb7de1..c5d6b78 100644 --- a/OpenSim/Framework/Console/CommandConsole.cs +++ b/OpenSim/Framework/Console/CommandConsole.cs | |||
@@ -188,19 +188,21 @@ namespace OpenSim.Framework.Console | |||
188 | { | 188 | { |
189 | lock (m_modulesCommands) | 189 | lock (m_modulesCommands) |
190 | { | 190 | { |
191 | if (m_modulesCommands.ContainsKey(moduleName)) | 191 | foreach (string key in m_modulesCommands.Keys) |
192 | { | 192 | { |
193 | List<CommandInfo> commands = m_modulesCommands[moduleName]; | 193 | // Allow topic help requests to succeed whether they are upper or lowercase. |
194 | var ourHelpText = commands.ConvertAll(c => string.Format("{0} - {1}", c.help_text, c.long_help)); | 194 | if (moduleName.ToLower() == key.ToLower()) |
195 | ourHelpText.Sort(); | 195 | { |
196 | helpText.AddRange(ourHelpText); | 196 | List<CommandInfo> commands = m_modulesCommands[key]; |
197 | var ourHelpText = commands.ConvertAll(c => string.Format("{0} - {1}", c.help_text, c.long_help)); | ||
198 | ourHelpText.Sort(); | ||
199 | helpText.AddRange(ourHelpText); | ||
197 | 200 | ||
198 | return true; | 201 | return true; |
199 | } | 202 | } |
200 | else | ||
201 | { | ||
202 | return false; | ||
203 | } | 203 | } |
204 | |||
205 | return false; | ||
204 | } | 206 | } |
205 | } | 207 | } |
206 | 208 | ||
diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs index 484159c..5de3f25 100644 --- a/OpenSim/Region/Application/OpenSimBase.cs +++ b/OpenSim/Region/Application/OpenSimBase.cs | |||
@@ -248,15 +248,16 @@ namespace OpenSim | |||
248 | { | 248 | { |
249 | string capitalizedTopic = char.ToUpper(topic[0]) + topic.Substring(1); | 249 | string capitalizedTopic = char.ToUpper(topic[0]) + topic.Substring(1); |
250 | 250 | ||
251 | // This is a hack to allow the user to enter the help command in upper or lowercase. This will go | ||
252 | // away at some point. | ||
253 | m_console.Commands.AddCommand(capitalizedTopic, false, "help " + topic, | ||
254 | "help " + capitalizedTopic, | ||
255 | "Get help on plugin command '" + topic + "'", | ||
256 | HandleCommanderHelp); | ||
251 | m_console.Commands.AddCommand(capitalizedTopic, false, "help " + capitalizedTopic, | 257 | m_console.Commands.AddCommand(capitalizedTopic, false, "help " + capitalizedTopic, |
252 | "help " + capitalizedTopic, | 258 | "help " + capitalizedTopic, |
253 | "Get help on plugin command '" + topic + "'", | 259 | "Get help on plugin command '" + topic + "'", |
254 | HandleCommanderHelp); | 260 | HandleCommanderHelp); |
255 | // | ||
256 | // m_console.Commands.AddCommand("General", false, topic, | ||
257 | // topic, | ||
258 | // "Execute subcommand for plugin '" + topic + "'", | ||
259 | // null); | ||
260 | 261 | ||
261 | ICommander commander = null; | 262 | ICommander commander = null; |
262 | 263 | ||