From e5f3a784b8c6e6b4fe9b299c3a3553f31fba5601 Mon Sep 17 00:00:00 2001 From: Manuel Nickschas Date: Thu, 2 Oct 2008 11:04:38 +0200 Subject: [PATCH] Remove legacy core/client protocol version checks --- src/client/clientsyncer.cpp | 5 +---- src/core/core.cpp | 5 +---- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/src/client/clientsyncer.cpp b/src/client/clientsyncer.cpp index 234a3c9f..2b532705 100644 --- a/src/client/clientsyncer.cpp +++ b/src/client/clientsyncer.cpp @@ -157,7 +157,6 @@ void ClientSyncer::coreSocketConnected() { QVariantMap clientInit; clientInit["MsgType"] = "ClientInit"; clientInit["ClientVersion"] = Quassel::buildInfo().fancyVersionString; - clientInit["ClientBuild"] = 860; // FIXME legacy! clientInit["ClientDate"] = Quassel::buildInfo().buildDate; clientInit["ProtocolVersion"] = Quassel::buildInfo().protocolVersion; clientInit["UseSsl"] = coreConnectionInfo["useSsl"]; @@ -184,9 +183,7 @@ void ClientSyncer::coreSocketDisconnected() { void ClientSyncer::clientInitAck(const QVariantMap &msg) { // Core has accepted our version info and sent its own. Let's see if we accept it as well... - uint ver = 0; - if(!msg.contains("ProtocolVersion") && msg["CoreBuild"].toUInt() >= 732) ver = 1; // legacy! - if(msg.contains("ProtocolVersion")) ver = msg["ProtocolVersion"].toUInt(); + uint ver = msg["ProtocolVersion"].toUInt(); if(ver < Quassel::buildInfo().clientNeedsProtocol) { emit connectionError(tr("The Quassel Core you are trying to connect to is too old!
" "Need at least core/client protocol v%1 to connect.").arg(Quassel::buildInfo().clientNeedsProtocol)); diff --git a/src/core/core.cpp b/src/core/core.cpp index 7a274320..8320dc08 100644 --- a/src/core/core.cpp +++ b/src/core/core.cpp @@ -414,9 +414,7 @@ void Core::processClientMessage(QTcpSocket *socket, const QVariantMap &msg) { QVariantMap reply; // Just version information -- check it! - uint ver = 0; - if(!msg.contains("ProtocolVersion") && msg["ClientBuild"].toUInt() >= 732) ver = 1; // FIXME legacy - if(msg.contains("ProtocolVersion")) ver = msg["ProtocolVersion"].toUInt(); + uint ver = msg["ProtocolVersion"].toUInt(); if(ver < Quassel::buildInfo().coreNeedsProtocol) { reply["MsgType"] = "ClientInitReject"; reply["Error"] = tr("Your Quassel Client is too old!
" @@ -429,7 +427,6 @@ void Core::processClientMessage(QTcpSocket *socket, const QVariantMap &msg) { reply["CoreVersion"] = Quassel::buildInfo().fancyVersionString; reply["CoreDate"] = Quassel::buildInfo().buildDate; - reply["CoreBuild"] = 860; // FIXME legacy reply["ProtocolVersion"] = Quassel::buildInfo().protocolVersion; // TODO: Make the core info configurable int uptime = startTime().secsTo(QDateTime::currentDateTime().toUTC()); -- 2.20.1