mirror of
https://github.com/znc/znc.git
synced 2026-07-06 01:41:12 +02:00
Allow the connection queue to be paused
This commit is contained in:
+13
-1
@@ -1868,7 +1868,7 @@ void CZNC::SetConnectDelay(unsigned int i) {
|
||||
}
|
||||
|
||||
void CZNC::EnableConnectQueue() {
|
||||
if (!m_pConnectQueueTimer) {
|
||||
if (!m_pConnectQueueTimer && !m_uiConnectPaused && !m_lpConnectQueue.empty()) {
|
||||
m_pConnectQueueTimer = new CConnectQueueTimer(m_uiConnectDelay);
|
||||
GetManager().AddCron(m_pConnectQueueTimer);
|
||||
}
|
||||
@@ -1882,6 +1882,18 @@ void CZNC::DisableConnectQueue() {
|
||||
}
|
||||
}
|
||||
|
||||
void CZNC::PauseConnectQueue() {
|
||||
DEBUG("Connection queue paused");
|
||||
m_uiConnectPaused++;
|
||||
DisableConnectQueue();
|
||||
}
|
||||
|
||||
void CZNC::ResumeConnectQueue() {
|
||||
DEBUG("Connection queue resumed");
|
||||
m_uiConnectPaused--;
|
||||
EnableConnectQueue();
|
||||
}
|
||||
|
||||
void CZNC::AddNetworkToQueue(CIRCNetwork *pNetwork) {
|
||||
// Make sure we are not already in the queue
|
||||
for (list<CIRCNetwork*>::const_iterator it = m_lpConnectQueue.begin(); it != m_lpConnectQueue.end(); ++it) {
|
||||
|
||||
Reference in New Issue
Block a user