mirror of
https://github.com/minetest/minetest.git
synced 2024-11-10 01:33:46 +01:00
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.
This commit is contained in:
parent
d2ca662569
commit
497299afd6
@ -613,7 +613,7 @@ void Server::handleCommand_Init2(NetworkPacket* pkt)
|
|||||||
playersao = StageTwoClientInit(pkt->getPeerId());
|
playersao = StageTwoClientInit(pkt->getPeerId());
|
||||||
|
|
||||||
if (playersao == NULL) {
|
if (playersao == NULL) {
|
||||||
errorstream
|
actionstream
|
||||||
<< "TOSERVER_INIT2 stage 2 client init failed for peer "
|
<< "TOSERVER_INIT2 stage 2 client init failed for peer "
|
||||||
<< pkt->getPeerId() << std::endl;
|
<< pkt->getPeerId() << std::endl;
|
||||||
return;
|
return;
|
||||||
@ -710,7 +710,7 @@ void Server::handleCommand_ClientReady(NetworkPacket* pkt)
|
|||||||
PlayerSAO* playersao = StageTwoClientInit(peer_id);
|
PlayerSAO* playersao = StageTwoClientInit(peer_id);
|
||||||
|
|
||||||
if (playersao == NULL) {
|
if (playersao == NULL) {
|
||||||
errorstream
|
actionstream
|
||||||
<< "TOSERVER_CLIENT_READY stage 2 client init failed for peer_id: "
|
<< "TOSERVER_CLIENT_READY stage 2 client init failed for peer_id: "
|
||||||
<< peer_id << std::endl;
|
<< peer_id << std::endl;
|
||||||
m_con.DisconnectPeer(peer_id);
|
m_con.DisconnectPeer(peer_id);
|
||||||
|
@ -1073,16 +1073,16 @@ PlayerSAO* Server::StageTwoClientInit(u16 peer_id)
|
|||||||
static_cast<RemotePlayer*>(m_env->getPlayer(playername.c_str()));
|
static_cast<RemotePlayer*>(m_env->getPlayer(playername.c_str()));
|
||||||
|
|
||||||
// If failed, cancel
|
// If failed, cancel
|
||||||
if((playersao == NULL) || (player == NULL)) {
|
if ((playersao == NULL) || (player == NULL)) {
|
||||||
if(player && player->peer_id != 0) {
|
if (player && player->peer_id != 0) {
|
||||||
errorstream<<"Server: "<<playername<<": Failed to emerge player"
|
actionstream << "Server: Failed to emerge player \"" << playername
|
||||||
<<" (player allocated to an another client)"<<std::endl;
|
<< "\" (player allocated to an another client)" << std::endl;
|
||||||
DenyAccess_Legacy(peer_id, L"Another client is connected with this "
|
DenyAccess_Legacy(peer_id, L"Another client is connected with this "
|
||||||
L"name. If your client closed unexpectedly, try again in "
|
L"name. If your client closed unexpectedly, try again in "
|
||||||
L"a minute.");
|
L"a minute.");
|
||||||
} else {
|
} else {
|
||||||
errorstream<<"Server: "<<playername<<": Failed to emerge player"
|
errorstream << "Server: " << playername << ": Failed to emerge player"
|
||||||
<<std::endl;
|
<< std::endl;
|
||||||
DenyAccess_Legacy(peer_id, L"Could not allocate player.");
|
DenyAccess_Legacy(peer_id, L"Could not allocate player.");
|
||||||
}
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
|
Loading…
Reference in New Issue
Block a user