From: Bas Pape Date: Tue, 4 Dec 2012 19:06:57 +0000 (+0100) Subject: Only chop \r\n instead of trimming all whitespace X-Git-Tag: 0.9-beta1~44 X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=commitdiff_plain;h=b426e5347d81b8cf1c5f2e2d71ec7bfd984cd5f7;ds=sidebyside 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 --- 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());