X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Fcore%2Fcorenetwork.cpp;h=d57cacaa5b8ee66c3f3effea1d8fbaf94c815865;hb=900ce3a2a445aa4b51efb1873aec0cf31aad3bb1;hp=18f27842a19427b3ee44966bdcee32125849bc8a;hpb=e2732dd9e88f292cf26d7a77b636d7baefe8f3d7;p=quassel.git diff --git a/src/core/corenetwork.cpp b/src/core/corenetwork.cpp index 18f27842..d57cacaa 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());