Allow wildcards in help command args

Supports the help command for *status, all modules that are using
CModCommand as appropriate, and *controlpanel get/set variables.
This commit is contained in:
J-P Nurmi
2014-09-13 22:33:46 +02:00
parent fab17f903c
commit 69e65ea45e
3 changed files with 11 additions and 7 deletions

View File

@@ -1549,7 +1549,7 @@ void CClient::UserPortCommand(CString& sLine) {
static void AddCommandHelp(CTable& Table, const CString& sCmd, const CString& sArgs, const CString& sDesc, const CString& sFilter = "")
{
const CString::size_type iFilterLength = sFilter.size();
if (sFilter.empty() || sCmd.Equals(sFilter, false, iFilterLength)) {
if (sFilter.empty() || sCmd.Equals(sFilter, false, iFilterLength) || sCmd.AsLower().WildCmp(sFilter.AsLower())) {
Table.AddRow();
Table.SetCell("Command", sCmd);
Table.SetCell("Arguments", sArgs);