From d3ca60526a2a571add67dd783356794dc9ae442c Mon Sep 17 00:00:00 2001 From: imaginos Date: Wed, 25 Aug 2004 23:14:35 +0000 Subject: [PATCH] just remove trailing \r\n git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@19 726aef4b-f618-498e-8847-2d620e286838 --- modules/schat.cc | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/modules/schat.cc b/modules/schat.cc index 4b2595d4..3758c571 100644 --- a/modules/schat.cc +++ b/modules/schat.cc @@ -14,8 +14,11 @@ * Author: imaginos * * $Log$ - * Revision 1.1 2004/08/24 00:08:52 prozacx - * Initial revision + * Revision 1.2 2004/08/25 23:14:35 imaginos + * just remove trailing \r\n + * + * Revision 1.1.1.1 2004/08/24 00:08:52 prozacx + * * * */ @@ -419,7 +422,12 @@ void CSChatSock::ReadLine( const CS_STRING & sLine ) if ( m_pModule ) { string sText = sLine; - CUtils::Trim( sText ); + if ( sText[sText.length()-1] == '\n' ) + sText.erase( sText.length()-1, 1 ); + + if ( sText[sText.length()-1] == '\r' ) + sText.erase( sText.length()-1, 1 ); + if ( m_pModule->IsAttached() ) m_pModule->SendToUser( m_sChatNick + "!" + m_sChatNick + "@" + GetRemoteIP(), sText ); else