mirror of
https://github.com/znc/znc.git
synced 2026-08-07 01:13:25 +02:00
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:
@@ -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 + "]");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user