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
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) {