mirror of
https://github.com/opensim/opensim.git
synced 2026-08-08 02:05:34 +08:00
Allow the user to enter help topics in upper or lowercase.
Forcing uppercase (e.g. help Assets) is too annoying. Thanks to WhiteStar for pointing this out.
This commit is contained in:
@@ -188,19 +188,21 @@ namespace OpenSim.Framework.Console
|
||||
{
|
||||
lock (m_modulesCommands)
|
||||
{
|
||||
if (m_modulesCommands.ContainsKey(moduleName))
|
||||
foreach (string key in m_modulesCommands.Keys)
|
||||
{
|
||||
List<CommandInfo> commands = m_modulesCommands[moduleName];
|
||||
var ourHelpText = commands.ConvertAll(c => string.Format("{0} - {1}", c.help_text, c.long_help));
|
||||
ourHelpText.Sort();
|
||||
helpText.AddRange(ourHelpText);
|
||||
// Allow topic help requests to succeed whether they are upper or lowercase.
|
||||
if (moduleName.ToLower() == key.ToLower())
|
||||
{
|
||||
List<CommandInfo> commands = m_modulesCommands[key];
|
||||
var ourHelpText = commands.ConvertAll(c => string.Format("{0} - {1}", c.help_text, c.long_help));
|
||||
ourHelpText.Sort();
|
||||
helpText.AddRange(ourHelpText);
|
||||
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user