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/net/loginhandler.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/net/loginhandler.cpp')
-rw-r--r-- | src/net/loginhandler.cpp | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/net/loginhandler.cpp b/src/net/loginhandler.cpp index 39b2e194..3a5b1c64 100644 --- a/src/net/loginhandler.cpp +++ b/src/net/loginhandler.cpp @@ -35,6 +35,7 @@ LoginHandler::LoginHandler() APMSG_REGISTER_RESPONSE, APMSG_RECONNECT_RESPONSE, APMSG_PASSWORD_CHANGE_RESPONSE, + APMSG_EMAIL_CHANGE_RESPONSE, 0 }; handledMessages = _messages; @@ -167,5 +168,36 @@ void LoginHandler::handleMessage(MessageIn &msg) } } break; + + case APMSG_EMAIL_CHANGE_RESPONSE: + { + int errMsg = msg.readInt8(); + // Successful pass change + if (errMsg == ERRMSG_OK) + { + state = STATE_CHANGEEMAIL; + } + // pass change failed + else + { + switch (errMsg) { + case ERRMSG_INVALID_ARGUMENT: + errorMessage = "New email address incorrect"; + break; + case ERRMSG_FAILURE: + errorMessage = "Old email address incorrect"; + break; + case ERRMSG_NO_LOGIN: + errorMessage = "Account not connected. Please login first."; + break; + default: + errorMessage = "Unknown error"; + break; + } + state = STATE_ACCOUNTCHANGE_ERROR; + } + } + break; + } } |