mirror of
https://github.com/znc/znc.git
synced 2026-06-30 15:01:54 +02:00
Warn if a *module message is ignored
Some modules (e.g. webadmin) don't handle messages to *module in any way. Make it clear to the user why they didn't get any reply back in this case. Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
+6
-1
@@ -493,7 +493,12 @@ void CModule::OnModCommand(const CString& sCommand) {
|
||||
HandleCommand(sCommand);
|
||||
}
|
||||
void CModule::OnUnknownModCommand(const CString& sLine) {
|
||||
if (!m_mCommands.empty())
|
||||
if (m_mCommands.empty())
|
||||
// This function is only called if OnModCommand wasn't
|
||||
// overriden, so no false warnings for modules which don't use
|
||||
// CModCommand for command handling.
|
||||
PutModule("This module doesn't implement any commands.");
|
||||
else
|
||||
PutModule("Unknown command!");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user