Remove legacy core/client protocol version checks
authorManuel Nickschas <sputnick@quassel-irc.org>
Thu, 2 Oct 2008 09:04:38 +0000 (11:04 +0200)
committerManuel Nickschas <sputnick@quassel-irc.org>
Sat, 4 Oct 2008 21:53:28 +0000 (23:53 +0200)
src/client/clientsyncer.cpp
src/core/core.cpp

index 234a3c9..2b53270 100644 (file)
@@ -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("<b>The Quassel Core you are trying to connect to is too old!</b><br>"
         "Need at least core/client protocol v%1 to connect.").arg(Quassel::buildInfo().clientNeedsProtocol));
index 7a27432..8320dc0 100644 (file)
@@ -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("<b>Your Quassel Client is too old!</b><br>"
@@ -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());