Skip to content
Permalink
Browse files Browse the repository at this point in the history
Better cleanup lines coming from network.
Thanks for Jeriko One <jeriko.one@gmx.us> for finding and reporting this.
  • Loading branch information
DarthGandalf committed Jul 14, 2018
1 parent a7bfbd9 commit d22fef8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/Client.cpp
Expand Up @@ -103,7 +103,8 @@ void CClient::ReadLine(const CString& sData) {
CLanguageScope user_lang(GetUser() ? GetUser()->GetLanguage() : "");
CString sLine = sData;

sLine.TrimRight("\n\r");
sLine.Replace("\n", "");
sLine.Replace("\r", "");

DEBUG("(" << GetFullName() << ") CLI -> ZNC ["
<< CDebug::Filter(sLine) << "]");
Expand Down
3 changes: 2 additions & 1 deletion src/IRCSock.cpp
Expand Up @@ -156,7 +156,8 @@ void CIRCSock::Quit(const CString& sQuitMsg) {
void CIRCSock::ReadLine(const CString& sData) {
CString sLine = sData;

sLine.TrimRight("\n\r");
sLine.Replace("\n", "");
sLine.Replace("\r", "");

DEBUG("(" << m_pNetwork->GetUser()->GetUserName() << "/"
<< m_pNetwork->GetName() << ") IRC -> ZNC [" << sLine << "]");
Expand Down

0 comments on commit d22fef8

Please sign in to comment.