Added preliminary support for multiple clients per user

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@547 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
prozacx
2005-10-09 08:40:40 +00:00
parent a26fdbdf91
commit aaec84a317
12 changed files with 283 additions and 230 deletions
+2 -14
View File
@@ -74,11 +74,6 @@ int CZNC::Loop() {
for (set<CUser*>::iterator it = m_ssDelUsers.begin(); it != m_ssDelUsers.end(); it++) {
CUser* pUser = *it;
m_msUsers.erase(pUser->GetUserName());
CUserSock* pUserSock = pUser->GetUserSock();
if (pUserSock) {
m_Manager.DelSockByAddr(pUserSock);
}
CIRCSock* pIRCSock = pUser->GetIRCSock();
@@ -148,11 +143,7 @@ int CZNC::Loop() {
}
DEBUG_ONLY( cout << "User [" << pUser->GetUserName() << "] is connecting to [" << pServer->GetName() << ":" << pServer->GetPort() << "] ..." << endl);
CUserSock* pUserSock = pUser->GetUserSock();
if (pUserSock) {
pUserSock->PutStatus("Attempting to connect to [" + pServer->GetName() + ":" + CString::ToString(pServer->GetPort()) + "] ...");
}
pUser->PutStatus("Attempting to connect to [" + pServer->GetName() + ":" + CString::ToString(pServer->GetPort()) + "] ...");
pIRCSock = new CIRCSock(pUser);
pIRCSock->SetPass(pServer->GetPass());
@@ -166,10 +157,7 @@ int CZNC::Loop() {
#endif
if (!m_Manager.Connect(pServer->GetName(), pServer->GetPort(), sSockName, 20, bSSL, pUser->GetVHost(), pIRCSock)) {
ReleaseISpoof();
if (pUserSock) {
pUserSock->PutStatus("Unable to connect. (Bad host?)");
}
pUser->PutStatus("Unable to connect. (Bad host?)");
}
}
}