Make OnConfigLine() a user module hook

It's only called for stuff defined in that user's section. The stuff outside of
a user section still can only be caught by global modules.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1849 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
psychon
2010-03-29 19:23:48 +00:00
parent 5b29a28a55
commit 5d2f3a03d0
3 changed files with 21 additions and 19 deletions
+7 -2
View File
@@ -1672,8 +1672,13 @@ bool CZNC::DoRehash(CString& sError)
{
if ((pChan && pChan == it->m_pChan) || (pUser && pUser == it->m_pUser))
continue; // skip unclosed user or chan
if (!GetModules().OnConfigLine(it->m_sName, it->m_sValue, it->m_pUser, it->m_pChan))
{
bool bHandled = false;
if (it->m_pUser) {
MODULECALL(OnConfigLine(it->m_sName, it->m_sValue, it->m_pUser, it->m_pChan), it->m_pUser, NULL, bHandled = true);
} else {
bHandled = GetModules().OnConfigLine(it->m_sName, it->m_sValue, it->m_pUser, it->m_pChan));
}
if (!bHandled) {
CUtils::PrintMessage("unhandled global module config line [GM:" + it->m_sName + "] = [" + it->m_sValue + "]");
}
}