summaryrefslogtreecommitdiff
path: root/src/game.cpp
diff options
context:
space:
mode:
authorLoïc Blot <nerzhul@users.noreply.github.com>2017-09-30 16:41:18 +0200
committerGitHub <noreply@github.com>2017-09-30 16:41:18 +0200
commit9fa78b7387ec6eb5f6e3419d37ae631085c69e1a (patch)
treeb320e33348b6b98ca0ed73e571e3ed9cb675f599 /src/game.cpp
parent8c16f18fdbe99aa6781a0e6e6c5b9c50d4c0b874 (diff)
downloadminetest-9fa78b7387ec6eb5f6e3419d37ae631085c69e1a.tar.gz
minetest-9fa78b7387ec6eb5f6e3419d37ae631085c69e1a.tar.bz2
minetest-9fa78b7387ec6eb5f6e3419d37ae631085c69e1a.zip
game.cpp: remove dead code for proto v25 compat (#6481)
Protocol v25 is not supported anymore
Diffstat (limited to 'src/game.cpp')
-rw-r--r--src/game.cpp23
1 files changed, 2 insertions, 21 deletions
diff --git a/src/game.cpp b/src/game.cpp
index f2a76d763..35d0aa9f9 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -2183,27 +2183,8 @@ bool Game::connectToServer(const std::string &playername,
wait_time += dtime;
// Only time out if we aren't waiting for the server we started
- if ((!address->empty()) && (wait_time > 10)) {
- bool sent_old_init = g_settings->getFlag("send_pre_v25_init");
- // If no pre v25 init was sent, and no answer was received,
- // but the low level connection could be established
- // (meaning that we have a peer id), then we probably wanted
- // to connect to a legacy server. In this case, tell the user
- // to enable the option to be able to connect.
- if (!sent_old_init &&
- (client->getProtoVersion() == 0) &&
- client->connectedToServer()) {
- *error_message = "Connection failure: init packet not "
- "recognized by server.\n"
- "Most likely the server uses an old protocol version (<v25).\n"
- "Please ask the server owner to update to 0.4.13 or later.\n"
- "To still connect to the server in the meantime,\n"
- "you can enable the 'send_pre_v25_init' setting by editing minetest.conf,\n"
- "or by enabling the 'Client -> Network -> Support older Servers'\n"
- "entry in the advanced settings menu.";
- } else {
- *error_message = "Connection timed out.";
- }
+ if (!address->empty() && wait_time > 10) {
+ *error_message = "Connection timed out.";
errorstream << *error_message << std::endl;
break;
}