summaryrefslogtreecommitdiff
path: root/src/net/ea
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/ea')
-rw-r--r--src/net/ea/charserverhandler.cpp2
-rw-r--r--src/net/ea/loginhandler.cpp5
-rw-r--r--src/net/ea/loginhandler.h3
3 files changed, 6 insertions, 4 deletions
diff --git a/src/net/ea/charserverhandler.cpp b/src/net/ea/charserverhandler.cpp
index d541ce09b..849fe15e1 100644
--- a/src/net/ea/charserverhandler.cpp
+++ b/src/net/ea/charserverhandler.cpp
@@ -242,7 +242,7 @@ void CharServerHandler::processCharMapInfo(Net::MessageIn &restrict msg,
PlayerInfo::setCharId(msg.readInt32());
GameHandler *const gh = static_cast<GameHandler*>(Net::getGameHandler());
gh->setMap(msg.readString(16));
- if (config.getBoolValue("usePersistentIP"))
+ if (config.getBoolValue("usePersistentIP") || client->getPersistentIp())
{
msg.readInt32();
server.hostname = client->getServerName();
diff --git a/src/net/ea/loginhandler.cpp b/src/net/ea/loginhandler.cpp
index af86aaf93..d4cf0e59e 100644
--- a/src/net/ea/loginhandler.cpp
+++ b/src/net/ea/loginhandler.cpp
@@ -75,7 +75,8 @@ void LoginHandler::loginAccount(LoginData *const loginData1) const
}
}
-void LoginHandler::chooseServer(const unsigned int server) const
+void LoginHandler::chooseServer(const unsigned int server,
+ const bool persistentIp) const
{
if (server >= mWorlds.size() || !mWorlds[server])
return;
@@ -83,7 +84,7 @@ void LoginHandler::chooseServer(const unsigned int server) const
ServerInfo *const charServer = getCharServer();
if (charServer)
{
- if (config.getBoolValue("usePersistentIP"))
+ if (config.getBoolValue("usePersistentIP") || persistentIp)
charServer->hostname = client->getServerName();
else
charServer->hostname = ipToString(mWorlds[server]->address);
diff --git a/src/net/ea/loginhandler.h b/src/net/ea/loginhandler.h
index 8619d4c34..d8bffc0be 100644
--- a/src/net/ea/loginhandler.h
+++ b/src/net/ea/loginhandler.h
@@ -61,7 +61,8 @@ class LoginHandler : public Net::LoginHandler
virtual void loginAccount(LoginData *const loginData)
const override final;
- virtual void chooseServer(const unsigned int server) const override;
+ virtual void chooseServer(const unsigned int server,
+ const bool persistentIp) const override;
virtual void registerAccount(const LoginData *const loginData)
const override final;