diff options
author | sapier <Sapier at GMX dot net> | 2014-06-29 17:55:21 +0200 |
---|---|---|
committer | sapier <Sapier at GMX dot net> | 2014-06-29 17:55:21 +0200 |
commit | ff36071d93266c1dd18708f8924d80aa1af5b33e (patch) | |
tree | 607d0763c8c98a0bf6af275d742cc2d785761d69 /src | |
parent | ea6c3835debfffa22163f048eae57928311143c4 (diff) | |
download | minetest-ff36071d93266c1dd18708f8924d80aa1af5b33e.tar.gz minetest-ff36071d93266c1dd18708f8924d80aa1af5b33e.tar.bz2 minetest-ff36071d93266c1dd18708f8924d80aa1af5b33e.zip |
Don't spam server console on player/playersao error but just drop the affected client
Diffstat (limited to 'src')
-rw-r--r-- | src/server.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/server.cpp b/src/server.cpp index 122ea993d..1223136b4 100644 --- a/src/server.cpp +++ b/src/server.cpp @@ -1789,18 +1789,20 @@ void Server::ProcessData(u8 *data, u32 datasize, u16 peer_id) } Player *player = m_env->getPlayer(peer_id); - if(player == NULL){ + if(player == NULL) { errorstream<<"Server::ProcessData(): Cancelling: " "No player for peer_id="<<peer_id - <<std::endl; + << " disconnecting peer!" <<std::endl; + m_con.DisconnectPeer(peer_id); return; } PlayerSAO *playersao = player->getPlayerSAO(); - if(playersao == NULL){ + if(playersao == NULL) { errorstream<<"Server::ProcessData(): Cancelling: " "No player object for peer_id="<<peer_id - <<std::endl; + << " disconnecting peer!" <<std::endl; + m_con.DisconnectPeer(peer_id); return; } |