diff options
author | Yohann Ferreira <bertram@cegetel.net> | 2008-04-25 23:15:03 +0000 |
---|---|---|
committer | Yohann Ferreira <bertram@cegetel.net> | 2008-04-25 23:15:03 +0000 |
commit | 536f18bdaae32831aa92702535586f26d0628a42 (patch) | |
tree | f438efa69af7a6588bd00df126cd1f7c07bb8641 /src/main.cpp | |
parent | 23e6d031b6c9f20dea6ba48dd1826d3286e18233 (diff) | |
download | mana-536f18bdaae32831aa92702535586f26d0628a42.tar.gz mana-536f18bdaae32831aa92702535586f26d0628a42.tar.bz2 mana-536f18bdaae32831aa92702535586f26d0628a42.tar.xz mana-536f18bdaae32831aa92702535586f26d0628a42.zip |
Added client-side email address change ability.
Diffstat (limited to 'src/main.cpp')
-rw-r--r-- | src/main.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp index d5d99f31..3d1a0e27 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -578,6 +578,14 @@ void accountChangePassword(LoginData *loginData) loginData->newPassword); } +void accountChangeEmail(LoginData *loginData) +{ + Net::registerHandler(&loginHandler); + + Net::AccountServer::Account::changeEmail(loginData->username, + loginData->newEmail); +} + void switchCharacter(std::string* passToken) { Net::registerHandler(&logoutHandler); @@ -1000,6 +1008,21 @@ int main(int argc, char *argv[]) break; + case STATE_CHANGEEMAIL_ATTEMPT: + logger->log("State: CHANGE EMAIL ATTEMPT"); + accountChangeEmail(&loginData); + break; + + case STATE_CHANGEEMAIL: + logger->log("State: CHANGE EMAIL"); + currentDialog = new OkDialog("Email Address change", + "Email Address changed successfully!"); + currentDialog->addActionListener(&accountListener); + currentDialog = NULL; // OkDialog deletes itself + loginData.email = loginData.newEmail; + loginData.newEmail = ""; + break; + case STATE_CHANGEPASSWORD_ATTEMPT: logger->log("State: CHANGE PASSWORD ATTEMPT"); accountChangePassword(&loginData); |