Skip to content

Commit 9fa78b7

Browse files
authoredSep 30, 2017
game.cpp: remove dead code for proto v25 compat (#6481)
Protocol v25 is not supported anymore
1 parent 8c16f18 commit 9fa78b7

File tree

1 file changed

+2
-21
lines changed

1 file changed

+2
-21
lines changed
 

Diff for: ‎src/game.cpp

+2-21
Original file line numberDiff line numberDiff line change
@@ -2183,27 +2183,8 @@ bool Game::connectToServer(const std::string &playername,
21832183

21842184
wait_time += dtime;
21852185
// Only time out if we aren't waiting for the server we started
2186-
if ((!address->empty()) && (wait_time > 10)) {
2187-
bool sent_old_init = g_settings->getFlag("send_pre_v25_init");
2188-
// If no pre v25 init was sent, and no answer was received,
2189-
// but the low level connection could be established
2190-
// (meaning that we have a peer id), then we probably wanted
2191-
// to connect to a legacy server. In this case, tell the user
2192-
// to enable the option to be able to connect.
2193-
if (!sent_old_init &&
2194-
(client->getProtoVersion() == 0) &&
2195-
client->connectedToServer()) {
2196-
*error_message = "Connection failure: init packet not "
2197-
"recognized by server.\n"
2198-
"Most likely the server uses an old protocol version (<v25).\n"
2199-
"Please ask the server owner to update to 0.4.13 or later.\n"
2200-
"To still connect to the server in the meantime,\n"
2201-
"you can enable the 'send_pre_v25_init' setting by editing minetest.conf,\n"
2202-
"or by enabling the 'Client -> Network -> Support older Servers'\n"
2203-
"entry in the advanced settings menu.";
2204-
} else {
2205-
*error_message = "Connection timed out.";
2206-
}
2186+
if (!address->empty() && wait_time > 10) {
2187+
*error_message = "Connection timed out.";
22072188
errorstream << *error_message << std::endl;
22082189
break;
22092190
}

0 commit comments

Comments
 (0)
Please sign in to comment.