From b0c696eaab501391512b08826c3c9a52023e2be7 Mon Sep 17 00:00:00 2001
From: Andrei Karas <akaras@inbox.ru>
Date: Sun, 23 Feb 2020 10:07:46 +0300
Subject: Fix alternate ip address for char and map servers [ci skip]

---
 src/net/ea/loginhandler.cpp     | 1 +
 src/net/tmwa/charserverrecv.cpp | 1 +
 2 files changed, 2 insertions(+)

(limited to 'src')

diff --git a/src/net/ea/loginhandler.cpp b/src/net/ea/loginhandler.cpp
index 103707a35..88b085aa3 100644
--- a/src/net/ea/loginhandler.cpp
+++ b/src/net/ea/loginhandler.cpp
@@ -97,6 +97,7 @@ void LoginHandler::chooseServer(const unsigned int server,
         }
         charServer->port = LoginRecv::mWorlds[server]->port;
     }
+    charServer->althostname = mServer.althostname;
 
     client->setState(State::UPDATE);
 }
diff --git a/src/net/tmwa/charserverrecv.cpp b/src/net/tmwa/charserverrecv.cpp
index 5d772a4bb..8074fa458 100644
--- a/src/net/tmwa/charserverrecv.cpp
+++ b/src/net/tmwa/charserverrecv.cpp
@@ -216,6 +216,7 @@ void CharServerRecv::processCharMapInfo(Net::MessageIn &restrict msg)
         server.hostname = ipToString(msg.readInt32("ip address"));
     }
     server.port = msg.readInt16("port");
+    server.althostname = charServer.althostname;
 
     // Prevent the selected local player from being deleted
     localPlayer = Net::CharServerHandler::mSelectedCharacter->dummy;
-- 
cgit v1.2.3-70-g09d2