From cd0e37c9ad66ab7377687de7a12e29342ad895f8 Mon Sep 17 00:00:00 2001 From: prozacx Date: Tue, 2 May 2006 01:16:38 +0000 Subject: [PATCH] Added error reporting and quit msgs as *status output git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@729 726aef4b-f618-498e-8847-2d620e286838 --- IRCSock.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/IRCSock.cpp b/IRCSock.cpp index 6d390592..610089cb 100644 --- a/IRCSock.cpp +++ b/IRCSock.cpp @@ -64,6 +64,15 @@ void CIRCSock::ReadLine(const CString& sData) { if (strncasecmp(sLine.c_str(), "PING ", 5) == 0) { PutIRC("PONG " + sLine.substr(5)); + } else if (strncasecmp(sLine.c_str(), "ERROR ", 6) == 0) { + //ERROR :Closing Link: nick[24.24.24.24] (Excess Flood) + CString sError(sLine.substr(7)); + + if (sError.Left(1) == ":") { + sError.LeftChomp(); + } + + m_pUser->PutStatus("Error from Server [" + sError + "]"); } else if (sLine.WildCmp(":* * *")) { //"^:(\\S+) (\\d\\d\\d) (.*?) (.*)$", vCap)) { CString sCmd = sLine.Token(1); @@ -400,6 +409,10 @@ void CIRCSock::ReadLine(const CString& sData) { // :nick!ident@host.com QUIT :message + if (Nick.GetNick().CaseCmp(GetNick()) == 0) { + m_pUser->PutStatus("You quit [" + sMessage + "]"); + } + vector vFoundChans; const vector& vChans = m_pUser->GetChans();