From: est31 Date: Mon, 18 May 2015 22:55:58 +0000 (+0200) Subject: Lower log level for unexpected behaviour X-Git-Tag: 0.4.13~248 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=497299afd62e2f9b18dbf2a366bb22996e73102b;p=oweals%2Fminetest.git Lower log level for unexpected behaviour Its a possible mistake to log in to a server with twice the same name. Before, it triggered a server wide error message, now it logs to actionstream. --- diff --git a/src/network/serverpackethandler.cpp b/src/network/serverpackethandler.cpp index 1eb7064d6..ea1528c64 100644 --- a/src/network/serverpackethandler.cpp +++ b/src/network/serverpackethandler.cpp @@ -613,7 +613,7 @@ void Server::handleCommand_Init2(NetworkPacket* pkt) playersao = StageTwoClientInit(pkt->getPeerId()); if (playersao == NULL) { - errorstream + actionstream << "TOSERVER_INIT2 stage 2 client init failed for peer " << pkt->getPeerId() << std::endl; return; @@ -710,7 +710,7 @@ void Server::handleCommand_ClientReady(NetworkPacket* pkt) PlayerSAO* playersao = StageTwoClientInit(peer_id); if (playersao == NULL) { - errorstream + actionstream << "TOSERVER_CLIENT_READY stage 2 client init failed for peer_id: " << peer_id << std::endl; m_con.DisconnectPeer(peer_id); diff --git a/src/server.cpp b/src/server.cpp index 778a93241..22b7d38f2 100644 --- a/src/server.cpp +++ b/src/server.cpp @@ -1073,16 +1073,16 @@ PlayerSAO* Server::StageTwoClientInit(u16 peer_id) static_cast(m_env->getPlayer(playername.c_str())); // If failed, cancel - if((playersao == NULL) || (player == NULL)) { - if(player && player->peer_id != 0) { - errorstream<<"Server: "<peer_id != 0) { + actionstream << "Server: Failed to emerge player \"" << playername + << "\" (player allocated to an another client)" << std::endl; DenyAccess_Legacy(peer_id, L"Another client is connected with this " L"name. If your client closed unexpectedly, try again in " L"a minute."); } else { - errorstream<<"Server: "<