diff options
Diffstat (limited to 'src/net')
-rw-r--r-- | src/net/ea/generalhandler.cpp | 1 | ||||
-rw-r--r-- | src/net/logindata.h | 2 | ||||
-rw-r--r-- | src/net/loginhandler.h | 5 | ||||
-rw-r--r-- | src/net/tmwserv/generalhandler.cpp | 3 | ||||
-rw-r--r-- | src/net/tmwserv/loginhandler.cpp | 3 | ||||
-rw-r--r-- | src/net/tmwserv/loginhandler.h | 2 |
6 files changed, 7 insertions, 9 deletions
diff --git a/src/net/ea/generalhandler.cpp b/src/net/ea/generalhandler.cpp index b9172379..c3eab725 100644 --- a/src/net/ea/generalhandler.cpp +++ b/src/net/ea/generalhandler.cpp @@ -107,7 +107,6 @@ GeneralHandler::GeneralHandler(): ItemDB::setStatsList(stats); - RegisterDialog::setEmail(NULL); RegisterDialog::setGender(&netToken.sex); } diff --git a/src/net/logindata.h b/src/net/logindata.h index c0ca0a4e..9cc3a3eb 100644 --- a/src/net/logindata.h +++ b/src/net/logindata.h @@ -34,6 +34,8 @@ struct LoginData std::string newPassword; std::string updateHost; + std::string email; + bool remember; /**< Whether to store the username. */ bool registerLogin; /**< Whether an account is being registered. */ diff --git a/src/net/loginhandler.h b/src/net/loginhandler.h index e4f8c767..e5a34382 100644 --- a/src/net/loginhandler.h +++ b/src/net/loginhandler.h @@ -36,8 +36,9 @@ class LoginHandler { public: enum OptionalAction { - Unregister = 0x1, - ChangeEmail = 0x2 + Unregister = 0x1, + ChangeEmail = 0x2, + SetEmailOnRegister = 0x4 }; virtual void setServer(const ServerInfo &server) diff --git a/src/net/tmwserv/generalhandler.cpp b/src/net/tmwserv/generalhandler.cpp index 7948953e..8e911c9c 100644 --- a/src/net/tmwserv/generalhandler.cpp +++ b/src/net/tmwserv/generalhandler.cpp @@ -63,7 +63,6 @@ Net::Connection *accountServerConnection = 0; namespace TmwServ { -std::string userEmail = ""; std::string netToken = ""; ServerInfo gameServer; ServerInfo chatServer; @@ -103,8 +102,6 @@ GeneralHandler::GeneralHandler(): ItemDB::setStatsList(stats); - ChangeEmailDialog::setEmail(&userEmail); - RegisterDialog::setEmail(&userEmail); RegisterDialog::setGender(NULL); } diff --git a/src/net/tmwserv/loginhandler.cpp b/src/net/tmwserv/loginhandler.cpp index 613b4128..7c4b1340 100644 --- a/src/net/tmwserv/loginhandler.cpp +++ b/src/net/tmwserv/loginhandler.cpp @@ -39,7 +39,6 @@ Net::LoginHandler *loginHandler; extern Net::Connection *accountServerConnection; namespace TmwServ { -extern std::string userEmail; LoginHandler::LoginHandler() { @@ -343,7 +342,7 @@ void LoginHandler::registerAccount(LoginData *loginData) 0, // client version loginData->username, loginData->password, - userEmail); + loginData->email); } void LoginHandler::unregisterAccount(const std::string &username, diff --git a/src/net/tmwserv/loginhandler.h b/src/net/tmwserv/loginhandler.h index 66f243b7..cbc2b96c 100644 --- a/src/net/tmwserv/loginhandler.h +++ b/src/net/tmwserv/loginhandler.h @@ -45,7 +45,7 @@ class LoginHandler : public MessageHandler, public Net::LoginHandler void disconnect(); int supportedOptionalActions() const - { return Unregister | ChangeEmail; } + { return Unregister | ChangeEmail | SetEmailOnRegister; } void loginAccount(LoginData *loginData); |