diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/accounthandler.cpp | 4 | ||||
-rw-r--r-- | src/defines.h | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/accounthandler.cpp b/src/accounthandler.cpp index 2ec3c298..c9f5098e 100644 --- a/src/accounthandler.cpp +++ b/src/accounthandler.cpp @@ -252,13 +252,13 @@ void AccountHandler::processMessage(NetComputer *comp, MessageIn &message) case PAMSG_REGISTER: { - std::string clientVersion = message.readString(); + unsigned long clientVersion = message.readLong(); std::string username = message.readString(); std::string password = message.readString(); std::string email = message.readString(); result.writeShort(APMSG_REGISTER_RESPONSE); - if (clientVersion < config.getValue("clientVersion", "0.0.0")) + if (clientVersion < config.getValue("clientVersion", 0)) { LOG_INFO("Client has an unsufficient version number to login.", 1); result.writeByte(REGISTER_INVALID_VERSION); diff --git a/src/defines.h b/src/defines.h index 22de5862..90896f81 100644 --- a/src/defines.h +++ b/src/defines.h @@ -113,11 +113,11 @@ const unsigned int MAX_CLIENTS = 1024, */ enum { // Login/Register - PAMSG_REGISTER = 0x0000, // S version, S username, S password, S email + PAMSG_REGISTER = 0x0000, // L version, S username, S password, S email APMSG_REGISTER_RESPONSE = 0x0002, // B error PAMSG_UNREGISTER = 0x0003, // - APMSG_UNREGISTER_RESPONSE = 0x0004, // B error - PAMSG_LOGIN = 0x0010, // S version, S username, S password + PAMSG_LOGIN = 0x0010, // L version, S username, S password APMSG_LOGIN_RESPONSE = 0x0012, // B error PAMSG_LOGOUT = 0x0013, // - APMSG_LOGOUT_RESPONSE = 0x0014, // B error |