From f1e6a41d83bb5170f6d0f6b2976024682ef16965 Mon Sep 17 00:00:00 2001 From: kroimon Date: Sat, 20 Sep 2008 16:00:26 +0000 Subject: [PATCH] Ignore messages to ourself when being disconnected from IRC. This suppresses "Your message to [yournick] got lost,..." messages when lagbars try to send notices to their own nick but ZNC is disconnected from IRC. git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1211 726aef4b-f618-498e-8847-2d620e286838 --- Client.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Client.cpp b/Client.cpp index db96ec07..8614941d 100644 --- a/Client.cpp +++ b/Client.cpp @@ -336,8 +336,10 @@ void CClient::ReadLine(const CString& sData) { #endif if (!m_pIRCSock) { - PutStatus("Your message to [" + sTarget + "] got lost, " - "you are not connected to IRC!"); + // Some lagmeters do a NOTICE to their own nick, ignore those. + if (sTarget.CaseCmp(m_sNick) != 0) + PutStatus("Your notice to [" + sTarget + "] got lost, " + "you are not connected to IRC!"); return; } @@ -534,8 +536,10 @@ void CClient::ReadLine(const CString& sData) { MODULECALL(OnUserMsg(sTarget, sMsg), m_pUser, this, return); if (!m_pIRCSock) { - PutStatus("Your message to [" + sTarget + "] got lost, " - "you are not connected to IRC!"); + // Some lagmeters do a PRIVMSG to their own nick, ignore those. + if (sTarget.CaseCmp(m_sNick) != 0) + PutStatus("Your message to [" + sTarget + "] got lost, " + "you are not connected to IRC!"); return; }