See #1147: show new server name when jumping

This updates the connect command in *status to retrieve the next server
object before triggering the jump, thereby allowing it to display the
next server's name rather than a generic message.
This commit is contained in:
John Reese
2015-10-12 16:27:01 -07:00
parent 69b031c43c
commit 9aff0cd566
3 changed files with 11 additions and 3 deletions
+6 -2
View File
@@ -1142,7 +1142,7 @@ bool CIRCNetwork::AddServer(const CString& sName, unsigned short uPort, const CS
return true;
}
CServer* CIRCNetwork::GetNextServer() {
CServer* CIRCNetwork::GetNextServer(bool bAdvance) {
if (m_vServers.empty()) {
return nullptr;
}
@@ -1151,7 +1151,11 @@ CServer* CIRCNetwork::GetNextServer() {
m_uServerIdx = 0;
}
return m_vServers[m_uServerIdx++];
if (bAdvance) {
return m_vServers[m_uServerIdx++];
} else {
return m_vServers[m_uServerIdx];
}
}
CServer* CIRCNetwork::GetCurrentServer() const {