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:
psychon
2010-07-08 16:43:23 +00:00
parent 94ea2c6c42
commit 9ae959b800
5 changed files with 34 additions and 47 deletions
+2 -2
View File
@@ -49,11 +49,11 @@ bool CRealListener::ConnectionFrom(const CString& sHost, unsigned short uPort) {
Csock* CRealListener::GetSockObj(const CString& sHost, unsigned short uPort) {
CIncomingConnection *pClient = new CIncomingConnection(sHost, uPort, m_pParent->GetAcceptType());
if (CZNC::Get().AllowConnectionFrom(sHost)) {
CZNC::Get().GetModules().OnClientConnect(pClient, sHost, uPort);
GLOBALMODULECALL(OnClientConnect(pClient, sHost, uPort), NULL, NULL, );
} else {
pClient->Write(":irc.znc.in 464 unknown-nick :Too many anonymous connections from your IP\r\n");
pClient->Close(Csock::CLT_AFTERWRITE);
CZNC::Get().GetModules().OnFailedLogin("", sHost);
GLOBALMODULECALL(OnFailedLogin("", sHost), NULL, NULL, );
}
return pClient;
}