summaryrefslogtreecommitdiff
path: root/src/net/ea
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-11-30 00:16:26 +0300
committerAndrei Karas <akaras@inbox.ru>2012-11-30 00:16:26 +0300
commite74bad91965068e4b91688a5c3df63bf6f2ca530 (patch)
treea1cf7b902ddb83ed9527e26bc6a0879e8bd130b7 /src/net/ea
parent13c2533f4a2d27f1c9156df2a8ad2851be2016fd (diff)
downloadmanaplus-e74bad91965068e4b91688a5c3df63bf6f2ca530.tar.gz
manaplus-e74bad91965068e4b91688a5c3df63bf6f2ca530.tar.bz2
manaplus-e74bad91965068e4b91688a5c3df63bf6f2ca530.tar.xz
manaplus-e74bad91965068e4b91688a5c3df63bf6f2ca530.zip
Add support for email field in registration form.
Diffstat (limited to 'src/net/ea')
-rw-r--r--src/net/ea/loginhandler.cpp7
-rw-r--r--src/net/ea/loginhandler.h3
2 files changed, 7 insertions, 3 deletions
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;