From b426e5347d81b8cf1c5f2e2d71ec7bfd984cd5f7 Mon Sep 17 00:00:00 2001 From: Bas Pape Date: Tue, 4 Dec 2012 20:06:57 +0100 Subject: [PATCH] Only chop \r\n instead of trimming all whitespace Any whitespace in front of the protocol's \r\n is part of the message and thus should not be trimmed. Fixes #1197 --- src/core/corenetwork.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/core/corenetwork.cpp b/src/core/corenetwork.cpp index ed3b39e7..3a2c208d 100644 --- a/src/core/corenetwork.cpp +++ b/src/core/corenetwork.cpp @@ -375,7 +375,8 @@ void CoreNetwork::setMyNick(const QString &mynick) void CoreNetwork::socketHasData() { while (socket.canReadLine()) { - QByteArray s = socket.readLine().trimmed(); + QByteArray s = socket.readLine(); + s.chop(2); NetworkDataEvent *event = new NetworkDataEvent(EventManager::NetworkIncoming, this, s); #if QT_VERSION >= 0x040700 event->setTimestamp(QDateTime::currentDateTimeUtc()); -- 2.20.1