1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-23 22:37:55 +02:00

Send error messages if operation fails

This commit is contained in:
Ivan Savenko
2024-02-02 00:12:30 +02:00
parent c5c46a7c9a
commit c9ebf32efd
8 changed files with 77 additions and 48 deletions

View File

@@ -38,8 +38,8 @@ void GlobalLobbyProcessor::onPacketReceived(const std::shared_ptr<INetworkConnec
{
JsonNode json(message.data(), message.size());
if(json["type"].String() == "loginFailed")
return receiveLoginFailed(json);
if(json["type"].String() == "operationFailed")
return receiveOperationFailed(json);
if(json["type"].String() == "loginSuccess")
return receiveLoginSuccess(json);
@@ -56,7 +56,7 @@ void GlobalLobbyProcessor::onPacketReceived(const std::shared_ptr<INetworkConnec
}
}
void GlobalLobbyProcessor::receiveLoginFailed(const JsonNode & json)
void GlobalLobbyProcessor::receiveOperationFailed(const JsonNode & json)
{
logGlobal->info("Lobby: Failed to login into a lobby server!");