X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcore%2Fcorenetwork.cpp;h=80986f0696f0243a5a99b77d4cec3f064653e619;hp=18f27842a19427b3ee44966bdcee32125849bc8a;hb=b2eee7d31624cc32a20f01d5b8a612c675f79564;hpb=ce26c3770b254362c7bd1e094ba8f8bf22133653 diff --git a/src/core/corenetwork.cpp b/src/core/corenetwork.cpp index 18f27842..80986f06 100644 --- a/src/core/corenetwork.cpp +++ b/src/core/corenetwork.cpp @@ -268,7 +268,7 @@ void CoreNetwork::putCmd(const QString &cmd, const QList ¶ms, co if (!prefix.isEmpty()) msg += ":" + prefix + " "; - msg += cmd.toUpper().toAscii(); + msg += cmd.toUpper().toLatin1(); for (int i = 0; i < params.size(); i++) { msg += " "; @@ -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());