mirror of
https://github.com/znc/znc.git
synced 2026-08-06 17:03:14 +02:00
Add CModule::OnUnknownModCommand()
This module hook is called to generate messages for unknown commands. This hook has a default implementation that actually does something! Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
+10
-1
@@ -431,6 +431,8 @@ bool CModule::HandleCommand(const CString& sLine) {
|
||||
return true;
|
||||
}
|
||||
|
||||
OnUnknownModCommand(sLine);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -478,10 +480,17 @@ void CModule::OnMode(const CNick& OpNick, CChan& Channel, char uMode, const CStr
|
||||
CModule::EModRet CModule::OnRaw(CString& sLine) { return CONTINUE; }
|
||||
|
||||
CModule::EModRet CModule::OnStatusCommand(CString& sCommand) { return CONTINUE; }
|
||||
void CModule::OnModCommand(const CString& sCommand) { HandleCommand(sCommand); }
|
||||
void CModule::OnModNotice(const CString& sMessage) {}
|
||||
void CModule::OnModCTCP(const CString& sMessage) {}
|
||||
|
||||
void CModule::OnModCommand(const CString& sCommand) {
|
||||
HandleCommand(sCommand);
|
||||
}
|
||||
void CModule::OnUnknownModCommand(const CString& sLine) {
|
||||
if (!m_mCommands.empty())
|
||||
PutModule("Unknown command!");
|
||||
}
|
||||
|
||||
void CModule::OnQuit(const CNick& Nick, const CString& sMessage, const vector<CChan*>& vChans) {}
|
||||
void CModule::OnNick(const CNick& Nick, const CString& sNewNick, const vector<CChan*>& vChans) {}
|
||||
void CModule::OnKick(const CNick& Nick, const CString& sKickedNick, CChan& Channel, const CString& sMessage) {}
|
||||
|
||||
Reference in New Issue
Block a user