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
This commit is contained in:
kroimon
2008-09-20 16:00:26 +00:00
parent 120c1cedf2
commit f1e6a41d83
+8 -4
View File
@@ -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;
}