mirror of
https://github.com/znc/znc.git
synced 2026-07-01 07:21:44 +02:00
Do all module calls through the macros
This commit should make sure that all module calls are done through either
MODULECALL, GLOBALMODULECALL or ALLMODULECALL. Also, in the process some module
calls where ("accidentally" ;) ) fixed to set correct values for a global
module's m_pUser during a module call.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2076 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
+10
-6
@@ -529,7 +529,7 @@ bool CModules::OnBoot() {
|
||||
for (unsigned int a = 0; a < size(); a++) {
|
||||
try {
|
||||
if (!(*this)[a]->OnBoot()) {
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
} catch (CModule::EModException e) {
|
||||
if (e == CModule::UNLOAD) {
|
||||
@@ -538,7 +538,7 @@ bool CModules::OnBoot() {
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
bool CModules::OnPreRehash() { MODUNLOADCHK(OnPreRehash()); return false; }
|
||||
@@ -614,24 +614,27 @@ bool CGlobalModules::OnDeleteUser(CUser& User) {
|
||||
GLOBALMODHALTCHK(OnDeleteUser(User));
|
||||
}
|
||||
|
||||
void CGlobalModules::OnClientConnect(CZNCSock* pClient, const CString& sHost, unsigned short uPort) {
|
||||
bool CGlobalModules::OnClientConnect(CZNCSock* pClient, const CString& sHost, unsigned short uPort) {
|
||||
GLOBALMODCALL(OnClientConnect(pClient, sHost, uPort));
|
||||
return false;
|
||||
}
|
||||
|
||||
bool CGlobalModules::OnLoginAttempt(CSmartPtr<CAuthBase> Auth) {
|
||||
GLOBALMODHALTCHK(OnLoginAttempt(Auth));
|
||||
}
|
||||
|
||||
void CGlobalModules::OnFailedLogin(const CString& sUsername, const CString& sRemoteIP) {
|
||||
bool CGlobalModules::OnFailedLogin(const CString& sUsername, const CString& sRemoteIP) {
|
||||
GLOBALMODCALL(OnFailedLogin(sUsername, sRemoteIP));
|
||||
return false;
|
||||
}
|
||||
|
||||
bool CGlobalModules::OnUnknownUserRaw(CClient* pClient, CString& sLine) {
|
||||
GLOBALMODHALTCHK(OnUnknownUserRaw(pClient, sLine));
|
||||
}
|
||||
|
||||
void CGlobalModules::OnClientCapLs(SCString& ssCaps) {
|
||||
bool CGlobalModules::OnClientCapLs(SCString& ssCaps) {
|
||||
GLOBALMODCALL(OnClientCapLs(ssCaps));
|
||||
return false;
|
||||
}
|
||||
|
||||
// Maybe create new macro for this?
|
||||
@@ -661,8 +664,9 @@ bool CGlobalModules::IsClientCapSupported(const CString& sCap, bool bState) {
|
||||
return bResult;
|
||||
}
|
||||
|
||||
void CGlobalModules::OnClientCapRequest(CClient* pClient, const CString& sCap, bool bState) {
|
||||
bool CGlobalModules::OnClientCapRequest(CClient* pClient, const CString& sCap, bool bState) {
|
||||
GLOBALMODCALL(OnClientCapRequest(pClient, sCap, bState));
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user