From: SmallJoker Date: Mon, 16 Oct 2017 18:12:48 +0000 (+0200) Subject: Fix strict_protocol_version_checking functionality after ee9a442 X-Git-Tag: 5.0.0~769 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=46f7fe91a2d404397115c3b970fa3b73f006519d;p=oweals%2Fminetest.git Fix strict_protocol_version_checking functionality after ee9a442 --- diff --git a/src/network/serverpackethandler.cpp b/src/network/serverpackethandler.cpp index 69c25b468..31bff7b5c 100644 --- a/src/network/serverpackethandler.cpp +++ b/src/network/serverpackethandler.cpp @@ -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 "