Tell user about no help filter matches

It's confusing if misspelled command gives no reply at all.
This commit is contained in:
J-P Nurmi
2014-09-13 22:41:29 +02:00
parent 69e65ea45e
commit 2901225ff3
2 changed files with 10 additions and 2 deletions

View File

@@ -582,7 +582,11 @@ void CModule::HandleHelpCommand(const CString& sLine) {
it->second.AddHelp(Table);
}
}
PutModule(Table);
if (Table.empty()) {
PutModule("No matches for '" + sFilter + "'");
} else {
PutModule(Table);
}
}
CString CModule::GetModNick() const { return ((m_pUser) ? m_pUser->GetStatusPrefix() : "*") + m_sModName; }