From 0003c28f7b1d4b8f9ac3bd13e5c898e5e3c940fe Mon Sep 17 00:00:00 2001 From: psychon Date: Thu, 17 Jul 2008 10:16:40 +0000 Subject: [PATCH] Shell module: Small cleanup We already have a special function for stripping of special chars, so why does the shell module still do it 'by hand'? git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1135 726aef4b-f618-498e-8847-2d620e286838 --- modules/shell.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/modules/shell.cpp b/modules/shell.cpp index e9dabcad..02f4513b 100644 --- a/modules/shell.cpp +++ b/modules/shell.cpp @@ -150,9 +150,7 @@ private: void CShellSock::ReadLine(const CString& sData) { CString sLine = sData; - while (sLine.length() && (sLine[sLine.length() -1] == '\r' || sLine[sLine.length() -1] == '\n')) { - sLine = sLine.substr(0, sLine.length() -1); - } + sLine.TrimRight("\r\n"); CString::size_type a = sLine.find('\t'); while (a != CString::npos) {