summaryrefslogtreecommitdiff
path: root/src/net/ea/loginhandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/ea/loginhandler.cpp')
-rw-r--r--src/net/ea/loginhandler.cpp19
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