mirror of
https://github.com/znc/znc.git
synced 2026-03-28 17:42:41 +01:00
Add OnRehashDone() module call
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@969 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
@@ -480,6 +480,7 @@ CString CModule::GetModNick() const { return ((m_pUser) ? m_pUser->GetStatusPref
|
||||
|
||||
bool CModule::OnLoad(const CString& sArgs, CString& sMessage) { sMessage = ""; return true; }
|
||||
bool CModule::OnBoot() { return true; }
|
||||
void CModule::OnRehashDone() {}
|
||||
void CModule::OnIRCDisconnected() {}
|
||||
void CModule::OnIRCConnected() {}
|
||||
CModule::EModRet CModule::OnBroadcast(CString& sMessage) { return CONTINUE; }
|
||||
@@ -585,6 +586,7 @@ bool CModules::OnBoot() {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CModules::OnRehashDone() { MODUNLOADCHK(OnRehashDone()); return false; }
|
||||
bool CModules::OnIRCConnected() { MODUNLOADCHK(OnIRCConnected()); return false; }
|
||||
bool CModules::OnBroadcast(CString& sMessage) { MODHALTCHK(OnBroadcast(sMessage)); }
|
||||
bool CModules::OnIRCDisconnected() { MODUNLOADCHK(OnIRCDisconnected()); return false; }
|
||||
|
||||
@@ -225,6 +225,7 @@ public:
|
||||
|
||||
virtual bool OnLoad(const CString& sArgsi, CString& sMessage);
|
||||
virtual bool OnBoot();
|
||||
virtual void OnRehashDone();
|
||||
virtual void OnIRCDisconnected();
|
||||
virtual void OnIRCConnected();
|
||||
virtual EModRet OnBroadcast(CString& sMessage);
|
||||
@@ -359,6 +360,7 @@ public:
|
||||
void UnloadAll();
|
||||
|
||||
virtual bool OnBoot(); // Return false to abort
|
||||
virtual bool OnRehashDone();
|
||||
virtual bool OnIRCDisconnected();
|
||||
virtual bool OnIRCConnected();
|
||||
virtual bool OnBroadcast(CString& sMessage);
|
||||
|
||||
8
znc.cpp
8
znc.cpp
@@ -837,6 +837,14 @@ bool CZNC::RehashConfig(CString& sError)
|
||||
m_msUsers.clear();
|
||||
|
||||
if (DoRehash(sError)) {
|
||||
#ifdef _MODULES
|
||||
GetModules().OnRehashDone();
|
||||
for (map<CString, CUser*>::iterator it = m_msUsers.begin();
|
||||
it != m_msUsers.end(); it++) {
|
||||
it->second->GetModules().OnRehashDone();
|
||||
}
|
||||
#endif
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user