diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/account-server/accounthandler.cpp | 25 | ||||
-rw-r--r-- | src/defines.h | 4 |
2 files changed, 2 insertions, 27 deletions
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 |