mirror of
https://github.com/znc/znc.git
synced 2026-08-06 08:52:57 +02:00
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:
+6
-2
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user