summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/net/ea/loginhandler.cpp23
-rw-r--r--src/net/ea/loginhandler.h2
-rw-r--r--src/net/eathena/loginhandler.cpp22
3 files changed, 21 insertions, 26 deletions
diff --git a/src/net/ea/loginhandler.cpp b/src/net/ea/loginhandler.cpp
index 0ad5a91af..e967b76b6 100644
--- a/src/net/ea/loginhandler.cpp
+++ b/src/net/ea/loginhandler.cpp
@@ -288,29 +288,6 @@ 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
{
}
diff --git a/src/net/ea/loginhandler.h b/src/net/ea/loginhandler.h
index 9bb41ec18..2cdb9943b 100644
--- a/src/net/ea/loginhandler.h
+++ b/src/net/ea/loginhandler.h
@@ -87,8 +87,6 @@ class LoginHandler notfinal : public Net::LoginHandler
static void processLoginError(Net::MessageIn &msg);
- static void processUpdateHost2(Net::MessageIn &msg);
-
void loginOrRegister(LoginData *const data) const override final;
protected:
diff --git a/src/net/eathena/loginhandler.cpp b/src/net/eathena/loginhandler.cpp
index 573b5212c..0b965f38c 100644
--- a/src/net/eathena/loginhandler.cpp
+++ b/src/net/eathena/loginhandler.cpp
@@ -27,6 +27,7 @@
#include "gui/windows/logindialog.h"
#include "net/generalhandler.h"
+#include "net/logindata.h"
#include "net/serverfeatures.h"
#include "net/eathena/messageout.h"
@@ -34,6 +35,7 @@
#include "net/eathena/protocol.h"
#include "utils/gettext.h"
+#include "utils/paths.h"
#include "debug.h"
@@ -251,7 +253,25 @@ void LoginHandler::processLoginError2(Net::MessageIn &msg)
void LoginHandler::processUpdateHost2(Net::MessageIn &msg)
{
- UNIMPLIMENTEDPACKET;
+ 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::sendVersion() const