Remove OnRehashDone and add OnPre/PostRehash

This patch is from SilverLeo.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1046 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
psychon
2008-05-09 14:48:06 +00:00
parent b16e3ebe6c
commit dde7921e6c
3 changed files with 18 additions and 6 deletions

12
znc.cpp
View File

@@ -855,6 +855,14 @@ bool CZNC::ParseConfig(const CString& sConfig)
bool CZNC::RehashConfig(CString& sError)
{
#ifdef _MODULES
GetModules().OnPreRehash();
for (map<CString, CUser*>::iterator itb = m_msUsers.begin();
itb != m_msUsers.end(); itb++) {
itb->second->GetModules().OnPreRehash();
}
#endif
// This clears m_msDelUsers
HandleUserDeletion();
@@ -864,10 +872,10 @@ bool CZNC::RehashConfig(CString& sError)
if (DoRehash(sError)) {
#ifdef _MODULES
GetModules().OnRehashDone();
GetModules().OnPostRehash();
for (map<CString, CUser*>::iterator it = m_msUsers.begin();
it != m_msUsers.end(); it++) {
it->second->GetModules().OnRehashDone();
it->second->GetModules().OnPostRehash();
}
#endif