Do not broadcast an empty chat message when someone tries to log in with the wrong...
authorKahrl <kahrl@gmx.net>
Mon, 21 Nov 2011 00:42:52 +0000 (01:42 +0100)
committerPerttu Ahola <celeron55@gmail.com>
Sat, 3 Dec 2011 09:47:19 +0000 (11:47 +0200)
src/server.cpp

index 873198d1e5f11d6e383fb5b5825e90dc5a0c4176..dcbc9fe7619ca16c84dd9c0e98bf3ec815fea7b2 100644 (file)
@@ -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