From c4f1eb3da39dff5ddaebae0d957ef86480d89b31 Mon Sep 17 00:00:00 2001 From: psychon Date: Fri, 25 Apr 2008 16:30:11 +0000 Subject: [PATCH] Print a warning if a msg / notice gets lost because we are not connected to IRC git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1032 726aef4b-f618-498e-8847-2d620e286838 --- Client.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Client.cpp b/Client.cpp index 4137e481..72573350 100644 --- a/Client.cpp +++ b/Client.cpp @@ -310,6 +310,12 @@ void CClient::ReadLine(const CString& sData) { } #endif + if (!m_pIRCSock) { + PutStatus("Your message to [" + sTarget + "] got lost, " + "you are not connected to IRC!"); + return; + } + CChan* pChan = m_pUser->FindChan(sTarget); if ((pChan) && (pChan->KeepBuffer())) { @@ -532,6 +538,12 @@ void CClient::ReadLine(const CString& sData) { MODULECALL(OnUserMsg(sTarget, sMsg), m_pUser, this, return); #endif + if (!m_pIRCSock) { + PutStatus("Your message to [" + sTarget + "] got lost, " + "you are not connected to IRC!"); + return; + } + CChan* pChan = m_pUser->FindChan(sTarget); if ((pChan) && (pChan->KeepBuffer())) {