From e74bad91965068e4b91688a5c3df63bf6f2ca530 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 30 Nov 2012 00:16:26 +0300 Subject: Add support for email field in registration form. --- src/net/ea/loginhandler.cpp | 7 +++++-- src/net/ea/loginhandler.h | 3 ++- 2 files changed, 7 insertions(+), 3 deletions(-) (limited to 'src/net/ea') diff --git a/src/net/ea/loginhandler.cpp b/src/net/ea/loginhandler.cpp index c00301c7a..ac4f0466c 100644 --- a/src/net/ea/loginhandler.cpp +++ b/src/net/ea/loginhandler.cpp @@ -70,7 +70,7 @@ void LoginHandler::loginAccount(LoginData *loginData) // with a different config. loginData->resetCharacterSlots(); - sendLoginRegister(loginData->username, loginData->password); + sendLoginRegister(loginData->username, loginData->password, ""); } } @@ -114,7 +114,7 @@ void LoginHandler::registerAccount(LoginData *loginData) break; } - sendLoginRegister(username, loginData->password); + sendLoginRegister(username, loginData->password, loginData->email); } Worlds LoginHandler::getWorlds() const @@ -261,6 +261,9 @@ void LoginHandler::processLoginError(Net::MessageIn &msg) case 10: errorMessage = _("Wrong name."); break; + case 11: + errorMessage = _("Incorrect email."); + break; case 99: errorMessage = _("Username permanently erased."); break; diff --git a/src/net/ea/loginhandler.h b/src/net/ea/loginhandler.h index eebe73ad5..89e6e1c47 100644 --- a/src/net/ea/loginhandler.h +++ b/src/net/ea/loginhandler.h @@ -91,7 +91,8 @@ class LoginHandler : public Net::LoginHandler protected: virtual void sendLoginRegister(const std::string &username, - const std::string &password) = 0; + const std::string &password, + const std::string &email) = 0; bool mVersionResponse; bool mRegistrationEnabled; -- cgit v1.2.3-70-g09d2