From 9e5ec2d563441d983f60f34d7aa97c55d5dd66f2 Mon Sep 17 00:00:00 2001 From: psychon Date: Tue, 8 Jul 2008 09:38:50 +0000 Subject: [PATCH] CIRCSock: Only say we are reconnecting if there is a server to connect to If you '/msg *status delserver'd your last server, you would get a message saying ZNC will reconnect, but it didn't. Now those messages look much better. git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1117 726aef4b-f618-498e-8847-2d620e286838 --- IRCSock.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/IRCSock.cpp b/IRCSock.cpp index 3bfffa93..c4816e83 100644 --- a/IRCSock.cpp +++ b/IRCSock.cpp @@ -922,7 +922,8 @@ void CIRCSock::Disconnected() { MODULECALL(OnIRCDisconnected(), m_pUser, NULL, ); DEBUG_ONLY(cout << GetSockName() << " == Disconnected()" << endl); - if (!m_pUser->IsBeingDeleted() && m_pUser->GetIRCConnectEnabled()) { + if (!m_pUser->IsBeingDeleted() && m_pUser->GetIRCConnectEnabled() && + m_pUser->GetServers().size() != 0) { m_pUser->PutStatus("Disconnected from IRC. Reconnecting..."); } m_pUser->ClearRawBuffer();