summaryrefslogtreecommitdiff
path: root/src/net/ea/loginhandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/ea/loginhandler.cpp')
-rw-r--r--src/net/ea/loginhandler.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/net/ea/loginhandler.cpp b/src/net/ea/loginhandler.cpp
index 11fe197c2..8b2ec1ed1 100644
--- a/src/net/ea/loginhandler.cpp
+++ b/src/net/ea/loginhandler.cpp
@@ -323,6 +323,29 @@ void LoginHandler::loginOrRegister(LoginData *const data) const
serverConfig.setValue("remember", remember);
}
+void LoginHandler::processUpdateHost2(Net::MessageIn &msg)
+{
+ const int len = msg.readInt16("len") - 4;
+ const std::string updateHost = msg.readString(len, "host");
+
+ splitToStringVector(loginData.updateHosts, updateHost, '|');
+ FOR_EACH (StringVectIter, it, loginData.updateHosts)
+ {
+ if (!checkPath(*it))
+ {
+ logger->log1("Warning: incorrect update server name");
+ loginData.updateHosts.clear();
+ break;
+ }
+ }
+
+ logger->log("Received update hosts \"%s\" from login server.",
+ updateHost.c_str());
+
+ if (client->getState() == STATE_PRE_LOGIN)
+ client->setState(STATE_LOGIN);
+}
+
void LoginHandler::logout() const
{
}