diff options
Diffstat (limited to 'src/net/ea')
-rw-r--r-- | src/net/ea/adminhandler.cpp | 2 | ||||
-rw-r--r-- | src/net/ea/loginhandler.cpp | 7 | ||||
-rw-r--r-- | src/net/ea/partyhandler.cpp | 6 |
3 files changed, 7 insertions, 8 deletions
diff --git a/src/net/ea/adminhandler.cpp b/src/net/ea/adminhandler.cpp index 4dd8083f3..cf6869422 100644 --- a/src/net/ea/adminhandler.cpp +++ b/src/net/ea/adminhandler.cpp @@ -93,7 +93,7 @@ void AdminHandler::createItems(const int id, const int color, void AdminHandler::processKickAck(Net::MessageIn &msg) { - if (msg.readInt32() == 0) + if (msg.readInt32("flag") == 0) NotifyManager::notify(NotifyTypes::KICK_FAIL); else NotifyManager::notify(NotifyTypes::KICK_SUCCEED); diff --git a/src/net/ea/loginhandler.cpp b/src/net/ea/loginhandler.cpp index 8b2ec1ed1..34d5a0d02 100644 --- a/src/net/ea/loginhandler.cpp +++ b/src/net/ea/loginhandler.cpp @@ -234,6 +234,7 @@ void LoginHandler::processLoginError(Net::MessageIn &msg) { const uint8_t code = msg.readUInt8("error"); logger->log("Login::error code: %u", static_cast<unsigned int>(code)); + std::string date = msg.readString(20, "date"); switch (code) { @@ -266,10 +267,8 @@ void LoginHandler::processLoginError(Net::MessageIn &msg) case 6: // TRANSLATORS: error message errorMessage = strprintf(_("You have been temporarily " - "banned from the game until " - "%s.\nPlease contact the GM " - "team via the forums."), - msg.readString(20).c_str()); + "banned from the game until %s.\nPlease contact the GM " + "team via the forums."), date.c_str()); break; case 7: // TRANSLATORS: error message diff --git a/src/net/ea/partyhandler.cpp b/src/net/ea/partyhandler.cpp index 806864324..20bb93a5c 100644 --- a/src/net/ea/partyhandler.cpp +++ b/src/net/ea/partyhandler.cpp @@ -77,7 +77,7 @@ void PartyHandler::clear() const void PartyHandler::processPartyCreate(Net::MessageIn &msg) { - if (msg.readUInt8()) + if (msg.readUInt8("flag")) NotifyManager::notify(NotifyTypes::PARTY_CREATE_FAILED); else NotifyManager::notify(NotifyTypes::PARTY_CREATED); @@ -85,8 +85,8 @@ void PartyHandler::processPartyCreate(Net::MessageIn &msg) void PartyHandler::processPartyInvited(Net::MessageIn &msg) { - const int id = msg.readInt32(); - const std::string partyName = msg.readString(24); + const int id = msg.readInt32("account id"); + const std::string partyName = msg.readString(24, "party name"); std::string nick; if (actorManager) |