diff options
author | Yohann Ferreira <bertram@cegetel.net> | 2008-04-25 23:58:53 +0000 |
---|---|---|
committer | Yohann Ferreira <bertram@cegetel.net> | 2008-04-25 23:58:53 +0000 |
commit | 19d8859a9c997591d8e0fbbda745da7258104eee (patch) | |
tree | a8088ed44a64900bd7b78db2ba56439d0110702b | |
parent | 5b967eff8c94ba383f2c8b09ddacf4653f571f77 (diff) | |
download | manaserv-19d8859a9c997591d8e0fbbda745da7258104eee.tar.gz manaserv-19d8859a9c997591d8e0fbbda745da7258104eee.tar.bz2 manaserv-19d8859a9c997591d8e0fbbda745da7258104eee.tar.xz manaserv-19d8859a9c997591d8e0fbbda745da7258104eee.zip |
Realigned Email already exists error return value and removed GetEmail Address
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | src/account-server/accounthandler.cpp | 25 | ||||
-rw-r--r-- | src/defines.h | 4 |
3 files changed, 7 insertions, 27 deletions
@@ -1,3 +1,8 @@ +2008-04_23 Yohann Ferreira <bertram@cegetel.net> + + * src/account-server/accounthandler.cpp, src/defines.h: Realigned + Email already exists error return value and removed GetEmail Address. + 2008-04-23 Bjørn Lindeijer <bjorn@lindeijer.nl> * src/utils/sha2.h, src/utils/sha256.h, src/utils/sha2.cpp, diff --git a/src/account-server/accounthandler.cpp b/src/account-server/accounthandler.cpp index 5083758d..871d1685 100644 --- a/src/account-server/accounthandler.cpp +++ b/src/account-server/accounthandler.cpp @@ -408,7 +408,7 @@ static void handleEmailChangeMessage(AccountClient &computer, MessageIn &msg) } else if (storage->doesEmailAddressExist(emailHash)) { - reply.writeByte(EMAILCHG_EXISTS_EMAIL); + reply.writeByte(ERRMSG_EMAIL_ALREADY_EXISTS); } else { @@ -420,24 +420,6 @@ static void handleEmailChangeMessage(AccountClient &computer, MessageIn &msg) computer.send(reply); } -static void handleEmailGetMessage(AccountClient &computer) -{ - MessageOut reply(APMSG_EMAIL_GET_RESPONSE); - - Account *acc = computer.getAccount(); - if (!acc) - { - reply.writeByte(ERRMSG_NO_LOGIN); - computer.send(reply); - return; - } - - reply.writeByte(ERRMSG_OK); - reply.writeString(acc->getEmail()); - - computer.send(reply); -} - static void handlePasswordChangeMessage(AccountClient &computer, MessageIn &msg) { std::string oldPassword = msg.readString(); @@ -754,11 +736,6 @@ void AccountHandler::processMessage(NetComputer *comp, MessageIn &message) handleEmailChangeMessage(computer, message); break; - case PAMSG_EMAIL_GET: - LOG_DEBUG("Received msg ... PAMSG_EMAIL_GET"); - handleEmailGetMessage(computer); - break; - case PAMSG_PASSWORD_CHANGE: LOG_DEBUG("Received msg ... PAMSG_PASSWORD_CHANGE"); handlePasswordChangeMessage(computer, message); diff --git a/src/defines.h b/src/defines.h index fc6d0469..640eb9bc 100644 --- a/src/defines.h +++ b/src/defines.h @@ -24,7 +24,6 @@ #ifndef _TMWSERV_DEFINES_H_ #define _TMWSERV_DEFINES_H_ - /** * Enumeration type for account levels. */ @@ -110,8 +109,6 @@ enum { APMSG_CHAR_SELECT_RESPONSE = 0x0027, // B error, B*32 token, S game address, W game port, S chat address, W chat port PAMSG_EMAIL_CHANGE = 0x0030, // S email APMSG_EMAIL_CHANGE_RESPONSE = 0x0031, // B error - PAMSG_EMAIL_GET = 0x0032, // - - APMSG_EMAIL_GET_RESPONSE = 0x0033, // B error, S email PAMSG_PASSWORD_CHANGE = 0x0034, // S old password, S new password APMSG_PASSWORD_CHANGE_RESPONSE = 0x0035, // B error @@ -264,6 +261,7 @@ enum { ERRMSG_NO_CHARACTER_SELECTED, // the user needs a character ERRMSG_INSUFFICIENT_RIGHTS, // the user is not privileged ERRMSG_INVALID_ARGUMENT, // part of the received message was invalid + ERRMSG_EMAIL_ALREADY_EXISTS, // The Email Address already exists ERRMSG_ALREADY_TAKEN, // name used was already taken ERRMSG_SERVER_FULL, // the server is overloaded ERRMSG_TIME_OUT // data failed to arrive in due time |