Fixed some issues when modules were not defined

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@632 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
prozacx
2006-02-10 02:25:49 +00:00
parent 09aaf0e441
commit eab420a13b
2 changed files with 11 additions and 2 deletions
+8
View File
@@ -132,9 +132,11 @@ void CClient::ReadLine(const CString& sData) {
for (unsigned int a = 0; a < vChans.size(); a++) {
CString sChannel = vChans[a];
#ifdef _MODULES
CZNC::Get().GetModules().SetClient(this);
MODULECALLCONT(OnUserJoin(sChannel, sKey));
CZNC::Get().GetModules().SetClient(NULL);
#endif
CChan* pChan = m_pUser->FindChan(sChannel);
@@ -166,9 +168,11 @@ void CClient::ReadLine(const CString& sData) {
sMessage.LeftChomp();
}
#ifdef _MODULES
CZNC::Get().GetModules().SetClient(this);
MODULECALLRET(OnUserPart(sChan, sMessage));
CZNC::Get().GetModules().SetClient(NULL);
#endif
if (m_pUser) {
CChan* pChan = m_pUser->FindChan(sChan);
@@ -1210,9 +1214,11 @@ void CClient::AuthUser() {
SendMotd();
#ifdef _MODULES
CZNC::Get().GetModules().SetClient(this);
VOIDMODULECALL(OnUserAttached());
CZNC::Get().GetModules().SetClient(NULL);
#endif
}
}
@@ -1231,9 +1237,11 @@ void CClient::Disconnected() {
m_pIRCSock = NULL;
}
#ifdef _MODULES
CZNC::Get().GetModules().SetClient(this);
VOIDMODULECALL(OnUserDetached());
CZNC::Get().GetModules().SetClient(NULL);
#endif
}
void CClient::IRCConnected(CIRCSock* pIRCSock) {