X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fcore%2Fcorenetwork.cpp;h=80986f0696f0243a5a99b77d4cec3f064653e619;hb=a20c9bf454288c998cb2a5d2a1fdf0927c93f1f3;hp=b7d496af8830d74dd19f7f8ddb60d4e35bf4da8b;hpb=84cd3561e97167ffb98ecab0fd2b884ba1d13ada;p=quassel.git diff --git a/src/core/corenetwork.cpp b/src/core/corenetwork.cpp index b7d496af..80986f06 100644 --- a/src/core/corenetwork.cpp +++ b/src/core/corenetwork.cpp @@ -411,7 +411,10 @@ void CoreNetwork::socketHasData() { while (socket.canReadLine()) { QByteArray s = socket.readLine(); - s.chop(2); + if (s.endsWith("\r\n")) + s.chop(2); + else if (s.endsWith("\n")) + s.chop(1); NetworkDataEvent *event = new NetworkDataEvent(EventManager::NetworkIncoming, this, s); #if QT_VERSION >= 0x040700 event->setTimestamp(QDateTime::currentDateTimeUtc());