diff options
author | Jared Adams <jaxad0127@gmail.com> | 2010-04-09 16:51:26 -0600 |
---|---|---|
committer | Jared Adams <jaxad0127@gmail.com> | 2010-04-09 20:21:21 -0600 |
commit | 9d94337026bbe6236bc4a39143c839a3bb386326 (patch) | |
tree | dac05e0eb05abd5476f735f55cb94921b96280da /src/net/ea/loginhandler.cpp | |
parent | c8b0e10348ea28da418985c997b324cfce865064 (diff) | |
download | mana-client-9d94337026bbe6236bc4a39143c839a3bb386326.tar.gz mana-client-9d94337026bbe6236bc4a39143c839a3bb386326.tar.bz2 mana-client-9d94337026bbe6236bc4a39143c839a3bb386326.tar.xz mana-client-9d94337026bbe6236bc4a39143c839a3bb386326.zip |
Add support for registration disabled for eAthena
Reviewed-by: Chuck Miller`
Diffstat (limited to 'src/net/ea/loginhandler.cpp')
-rw-r--r-- | src/net/ea/loginhandler.cpp | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/src/net/ea/loginhandler.cpp b/src/net/ea/loginhandler.cpp index 730535b8..42ba0c61 100644 --- a/src/net/ea/loginhandler.cpp +++ b/src/net/ea/loginhandler.cpp @@ -41,7 +41,8 @@ namespace EAthena { extern ServerInfo charServer; -LoginHandler::LoginHandler() +LoginHandler::LoginHandler(): + mRegistrationEnabled(true) { static const Uint16 _messages[] = { SMSG_UPDATE_HOST, @@ -190,9 +191,14 @@ void LoginHandler::handleMessage(Net::MessageIn &msg) msg.readInt8(); // T msg.readInt8(); // M msg.readInt8(); // W - msg.readInt8(); // (space) - msg.readInt8(); // e - msg.readInt8(); // A + + unsigned int options = msg.readInt32(); + + if (options & 1) + { + // Registeration not allowed + mRegistrationEnabled = false; + } //state = STATE_LOGIN; } @@ -217,6 +223,11 @@ void LoginHandler::disconnect() mNetwork->disconnect(); } +bool LoginHandler::isRegistrationEnabled() +{ + return mRegistrationEnabled; +} + void LoginHandler::getRegistrationDetails() { // Not supported, so move on |