From 00db0384900539a0c9f74b530823b5a3bbc17cbb Mon Sep 17 00:00:00 2001 From: Perttu Ahola Date: Tue, 6 Aug 2013 17:51:22 +0300 Subject: [PATCH] Clean up server's log messages and give a better error to client when it's player is in use --- src/server.cpp | 45 ++++++++++++++++++++++++++------------------- 1 file changed, 26 insertions(+), 19 deletions(-) diff --git a/src/server.cpp b/src/server.cpp index f5f6645..e16ac2a 100644 --- a/src/server.cpp +++ b/src/server.cpp @@ -1810,14 +1810,13 @@ void Server::ProcessData(u8 *data, u32 datasize, u16 peer_id) if(datasize < 2+1+PLAYERNAME_SIZE) return; - verbosestream<<"Server: Got TOSERVER_INIT from " - < 1){ - infostream<<"Server: Not allowing another client to connect in" - <<" simple singleplayer mode"< SERVER_PROTOCOL_VERSION_MAX) { - actionstream<<"Server: A mismatched client tried to connect from "<(m_env->getPlayer(playername)); + if(player && player->peer_id != 0){ + errorstream<<"Server: "<