mirror of
https://github.com/znc/znc.git
synced 2026-07-03 16:31:49 +02:00
Change second argument to module in OnLoad() from sErrorMsg to sMessage.
This message is always displayed when the module returns (well, screw webadmin) and this way a module can notify the user if it loaded but something unexpected happened. As you might guess, no one uses this ATM :) Proposal comes from prozac git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@855 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
+7
-2
@@ -475,7 +475,7 @@ void CModule::ListSockets() {
|
||||
const CString& CModule::GetModName() const { return m_sModName; }
|
||||
CString CModule::GetModNick() const { return ((m_pUser) ? m_pUser->GetStatusPrefix() : "*") + m_sModName; }
|
||||
|
||||
bool CModule::OnLoad(const CString& sArgs, CString& sErrorMsg) { sErrorMsg = ""; return true; }
|
||||
bool CModule::OnLoad(const CString& sArgs, CString& sMessage) { sMessage = ""; return true; }
|
||||
bool CModule::OnBoot() { return true; }
|
||||
void CModule::OnIRCDisconnected() {}
|
||||
void CModule::OnIRCConnected() {}
|
||||
@@ -787,7 +787,12 @@ bool CModules::LoadModule(const CString& sModule, const CString& sArgs, CUser* p
|
||||
}
|
||||
|
||||
pModule->SetArgs(sArgs);
|
||||
sRetMsg = "Loaded module [" + sModule + "] [" + sModPath + "]";
|
||||
|
||||
if (!sRetMsg.empty()) {
|
||||
sRetMsg = "Loaded module [" + sModule + "] [" + sRetMsg + "] [" + sModPath + "]";
|
||||
} else {
|
||||
sRetMsg = "Loaded module [" + sModule + "] [" + sModPath + "]";
|
||||
}
|
||||
return true;
|
||||
#endif // !_MODULES
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user