Fix strict_protocol_version_checking functionality after ee9a442
authorSmallJoker <mk939@ymail.com>
Mon, 16 Oct 2017 18:12:48 +0000 (20:12 +0200)
committerSmallJoker <mk939@ymail.com>
Mon, 16 Oct 2017 18:12:48 +0000 (20:12 +0200)
src/network/serverpackethandler.cpp

index 69c25b4687b719622c419f6f49e5de4503a7814b..31bff7b5c6f758cf9a59293e22d95e02bbb47f68 100644 (file)
@@ -142,7 +142,8 @@ void Server::handleCommand_Init(NetworkPacket* pkt)
 
        client->net_proto_version = net_proto_version;
 
-       if (g_settings->getBool("strict_protocol_version_checking") ||
+       if ((g_settings->getBool("strict_protocol_version_checking") &&
+                       net_proto_version != LATEST_PROTOCOL_VERSION) ||
                        net_proto_version < SERVER_PROTOCOL_VERSION_MIN ||
                        net_proto_version > SERVER_PROTOCOL_VERSION_MAX) {
                actionstream << "Server: A mismatched client tried to connect from "