diff --git a/src/client/component/party.cpp b/src/client/component/party.cpp index bd5b4aae..276c28cb 100644 --- a/src/client/component/party.cpp +++ b/src/client/component/party.cpp @@ -1159,6 +1159,13 @@ namespace party saved_info_response.host = target; saved_info_response.info_string = info; + const auto protocl = info.get("protocol"); + if (std::atoi(protocl.data()) != PROTOCOL) + { + menu_error("Connection failed: Invalid protocol."); + return; + } + if (info.get("challenge") != connect_state.challenge) { menu_error("Connection failed: Invalid challenge."); diff --git a/src/client/component/server_list.cpp b/src/client/component/server_list.cpp index ccf4fdfa..0d073289 100644 --- a/src/client/component/server_list.cpp +++ b/src/client/component/server_list.cpp @@ -316,6 +316,13 @@ namespace server_list void handle_info_response(const game::netadr_s& address, const utils::info_string& info) { + // Don't show servers that aren't using the same protocol! + const auto protocol = std::atoi(info.get("protocol").data()); + if (protocol != PROTOCOL) + { + return; + } + // Don't show servers that aren't dedicated! const auto dedicated = std::atoi(info.get("dedicated").data()); if (!dedicated)