From 8f44a2fe87654aaa669e4ef4cab61786a3cef896 Mon Sep 17 00:00:00 2001 From: prozacx Date: Wed, 25 Aug 2004 18:13:24 +0000 Subject: [PATCH] Only look at the first token for channel name on JOIN/PART git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@17 726aef4b-f618-498e-8847-2d620e286838 --- IRCSock.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/IRCSock.cpp b/IRCSock.cpp index 4b186253..e5461754 100644 --- a/IRCSock.cpp +++ b/IRCSock.cpp @@ -301,9 +301,9 @@ void CIRCSock::ReadLine(const string& sData) { m_pUser->GetModules().OnNick(sNickMask, sNewNick); #endif } else if (strcasecmp(sCmd.c_str(), "QUIT") == 0) { - string sChan = sRest; - if (CUtils::Left(sChan, 1) == ":") { - CUtils::LeftChomp(sChan); + string sMessage = sRest; + if (CUtils::Left(sMessage, 1) == ":") { + CUtils::LeftChomp(sMessage); } // :nick!ident@host.com QUIT :message @@ -319,10 +319,10 @@ void CIRCSock::ReadLine(const string& sData) { } #ifdef _MODULES - m_pUser->GetModules().OnQuit(Nick, sChan); + m_pUser->GetModules().OnQuit(Nick, sMessage); #endif } else if (strcasecmp(sCmd.c_str(), "JOIN") == 0) { - string sChan = sRest; + string sChan = CUtils::Token(sRest, 0); if (CUtils::Left(sChan, 1) == ":") { CUtils::LeftChomp(sChan); } @@ -339,7 +339,7 @@ void CIRCSock::ReadLine(const string& sData) { #endif } } else if (strcasecmp(sCmd.c_str(), "PART") == 0) { - string sChan = sRest; + string sChan = CUtils::Token(sRest, 0); if (CUtils::Left(sChan, 1) == ":") { CUtils::LeftChomp(sChan); }