aboutsummaryrefslogtreecommitdiff
path: root/src/server.cpp
diff options
context:
space:
mode:
authorest31 <MTest31@outlook.com>2015-05-19 00:55:58 +0200
committerest31 <MTest31@outlook.com>2015-05-19 00:55:58 +0200
commit497299afd62e2f9b18dbf2a366bb22996e73102b (patch)
treecce092e215868bd7da54d918623818e53f80e25a /src/server.cpp
parentd2ca662569427d36642660314668e416bf68f3c8 (diff)
downloadminetest-497299afd62e2f9b18dbf2a366bb22996e73102b.tar.gz
minetest-497299afd62e2f9b18dbf2a366bb22996e73102b.tar.bz2
minetest-497299afd62e2f9b18dbf2a366bb22996e73102b.zip
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.
Diffstat (limited to 'src/server.cpp')
-rw-r--r--src/server.cpp12
1 files changed, 6 insertions, 6 deletions
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<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;