summaryrefslogtreecommitdiff
path: root/src/network/core/tcp_connect.cpp
diff options
context:
space:
mode:
authorPatric Stout <truebrain@openttd.org>2021-04-29 15:37:02 +0200
committerPatric Stout <github@truebrain.nl>2021-07-11 20:38:42 +0200
commite4d216e44b4a5d87094b4478ea4cf18109f99a35 (patch)
tree837b4b027ebaf0a328d0336ac93c110379a015ba /src/network/core/tcp_connect.cpp
parent1baec41542780cf4fc898df7d2fc9925d823fb44 (diff)
downloadopenttd-e4d216e44b4a5d87094b4478ea4cf18109f99a35.tar.xz
Feature: join servers based on their invite code
This removes the need to know a server IP to join it. Invite codes are small (~7 characters) indentifiers for servers, which can be exchanged with other players to join the servers.
Diffstat (limited to 'src/network/core/tcp_connect.cpp')
-rw-r--r--src/network/core/tcp_connect.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/network/core/tcp_connect.cpp b/src/network/core/tcp_connect.cpp
index d9b6bb781..0e8e2e125 100644
--- a/src/network/core/tcp_connect.cpp
+++ b/src/network/core/tcp_connect.cpp
@@ -13,6 +13,7 @@
#include "../../thread.h"
#include "tcp.h"
+#include "../network_coordinator.h"
#include "../network_internal.h"
#include <deque>
@@ -48,8 +49,7 @@ TCPServerConnecter::TCPServerConnecter(const std::string &connection_string, uin
case SERVER_ADDRESS_INVITE_CODE:
this->status = Status::CONNECTING;
-
- // TODO -- The next commit will add this functionality.
+ _network_coordinator_client.ConnectToServer(this->server_address.connection_string, this);
break;
default: