aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKahrl <kahrl@gmx.net>2011-11-21 01:42:52 +0100
committerPerttu Ahola <celeron55@gmail.com>2011-12-03 11:47:19 +0200
commit275a348b75ae710f5cfdb71595ea6e95ecdbcd63 (patch)
treebb97f58f2264e728165dd3dbd7140635e894b3ea
parent189689716cca8959f8eb8851a37ef16fdbc0584d (diff)
downloadminetest-275a348b75ae710f5cfdb71595ea6e95ecdbcd63.tar.gz
minetest-275a348b75ae710f5cfdb71595ea6e95ecdbcd63.tar.bz2
minetest-275a348b75ae710f5cfdb71595ea6e95ecdbcd63.zip
Do not broadcast an empty chat message when someone tries to log in with the wrong password
-rw-r--r--src/server.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/server.cpp b/src/server.cpp
index 873198d1e..dcbc9fe76 100644
--- a/src/server.cpp
+++ b/src/server.cpp
@@ -4824,7 +4824,8 @@ void Server::handlePeerChange(PeerChange &c)
//SendPlayerInfos();
// Send leave chat message to all remaining clients
- BroadcastChatMessage(message);
+ if(message.length() != 0)
+ BroadcastChatMessage(message);
} // PEER_REMOVED
else