1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-11 17:51:04 +00: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:
est31 2015-05-19 00:55:58 +02:00
parent d2ca662569
commit 497299afd6
2 changed files with 8 additions and 8 deletions

View file

@ -1073,16 +1073,16 @@ PlayerSAO* Server::StageTwoClientInit(u16 peer_id)
static_cast<RemotePlayer*>(m_env->getPlayer(playername.c_str()));
// If failed, cancel
if((playersao == NULL) || (player == NULL)) {
if(player && player->peer_id != 0) {
errorstream<<"Server: "<<playername<<": Failed to emerge player"
<<" (player allocated to an another client)"<<std::endl;
if ((playersao == NULL) || (player == NULL)) {
if (player && player->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: "<<playername<<": Failed to emerge player"
<<std::endl;
errorstream << "Server: " << playername << ": Failed to emerge player"
<< std::endl;
DenyAccess_Legacy(peer_id, L"Could not allocate player.");
}
return NULL;