Some small cleanup to CUser::Clone()

This shouldn't change anything except the readers ability to understand this
snippet (hopefully).


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1658 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
psychon
2009-11-14 11:36:19 +00:00
parent 91962e32fc
commit 52ee8a11ef
2 changed files with 10 additions and 10 deletions
+9 -9
View File
@@ -379,20 +379,20 @@ bool CUser::Clone(const CUser& User, CString& sErrorRet, bool bCloneChans) {
AddServer(pServer->GetName(), pServer->GetPort(), pServer->GetPass(), pServer->IsSSL());
}
m_uServerIdx = 0;
for (a = 0; a < m_vServers.size(); a++) {
if (sServer.Equals(m_vServers[a]->GetName())) {
m_uServerIdx = a +1;
m_uServerIdx = a + 1;
break;
}
}
if (m_uServerIdx == 0) {
m_uServerIdx = m_vServers.size();
CIRCSock* pSock = GetIRCSock();
if (a == m_vServers.size() -1) {
m_uServerIdx = m_vServers.size();
CIRCSock* pSock = GetIRCSock();
if (pSock) {
PutStatus("Jumping servers because this server is no longer in the list");
pSock->Quit();
}
if (pSock) {
PutStatus("Jumping servers because this server is no longer in the list");
pSock->Quit();
}
}
// !Servers
+1 -1
View File
@@ -278,7 +278,7 @@ protected:
set<CDCCBounce*> m_sDCCBounces;
set<CDCCSock*> m_sDCCSocks;
set<CString> m_ssAllowedHosts;
unsigned int m_uServerIdx;
unsigned int m_uServerIdx; ///< Index in m_vServers of our current server + 1
unsigned int m_uBufferCount;
unsigned long long m_uBytesRead;
unsigned long long m_uBytesWritten;