msg wont be sent to self from server now even when not in lobby
This commit is contained in:
parent
1943e8c86b
commit
5e50905f81
@ -184,6 +184,9 @@ public class ClientHandler implements Runnable {
|
||||
} else {
|
||||
//send msg to all clients who are not in a lobby.
|
||||
for (ClientHandler client : connectedClients) {
|
||||
if(client.getClientUserName().equals(this.getClientUserName())){
|
||||
continue;
|
||||
}
|
||||
if (Lobby.clientIsInLobby(client) == -1) {
|
||||
client.sendMsgToClient(Protocol.printToClientChat + "$" + clientUserName + ": " + msg);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user