summaryrefslogtreecommitdiff
path: root/src/net
diff options
context:
space:
mode:
Diffstat (limited to 'src/net')
-rw-r--r--src/net/download.cpp3
-rw-r--r--src/net/ea/charserverhandler.cpp5
-rw-r--r--src/net/ea/loginhandler.cpp3
3 files changed, 7 insertions, 4 deletions
diff --git a/src/net/download.cpp b/src/net/download.cpp
index 011182a7e..2dc5cfe33 100644
--- a/src/net/download.cpp
+++ b/src/net/download.cpp
@@ -25,6 +25,7 @@
#include "client.h"
#include "logger.h"
#include "main.h"
+#include "settings.h"
#include "utils/files.h"
#include "utils/sdlhelper.h"
@@ -91,7 +92,7 @@ Download::Download(void *const ptr,
mOptions.checkAdler = true;
if (!mUpload)
{
- const std::string serverName = client->getServerName();
+ const std::string serverName = settings.serverName;
if (!serverName.empty())
{
if (mUrl.find("?") == std::string::npos)
diff --git a/src/net/ea/charserverhandler.cpp b/src/net/ea/charserverhandler.cpp
index 2f285269a..d7ad9fd11 100644
--- a/src/net/ea/charserverhandler.cpp
+++ b/src/net/ea/charserverhandler.cpp
@@ -24,6 +24,7 @@
#include "client.h"
#include "configuration.h"
+#include "settings.h"
#include "gui/windows/charcreatedialog.h"
#include "gui/windows/okdialog.h"
@@ -244,10 +245,10 @@ 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") || client->getPersistentIp())
+ if (config.getBoolValue("usePersistentIP") || settings.persistentIp)
{
msg.readInt32();
- server.hostname = client->getServerName();
+ server.hostname = settings.serverName;
}
else
{
diff --git a/src/net/ea/loginhandler.cpp b/src/net/ea/loginhandler.cpp
index c53cdb773..ecc51bfeb 100644
--- a/src/net/ea/loginhandler.cpp
+++ b/src/net/ea/loginhandler.cpp
@@ -25,6 +25,7 @@
#include "client.h"
#include "configuration.h"
#include "logger.h"
+#include "settings.h"
#include "gui/windows/logindialog.h"
@@ -85,7 +86,7 @@ void LoginHandler::chooseServer(const unsigned int server,
if (charServer)
{
if (config.getBoolValue("usePersistentIP") || persistentIp)
- charServer->hostname = client->getServerName();
+ charServer->hostname = settings.serverName;
else
charServer->hostname = ipToString(mWorlds[server]->address);
charServer->port = mWorlds[server]->port;