Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
df3964a9fa
@ -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);
|
||||
}
|
||||
@ -213,6 +216,9 @@ public class ClientHandler implements Runnable {
|
||||
*/
|
||||
public void broadcastChatMessageToAll(String msg) {
|
||||
for (ClientHandler client : connectedClients) {
|
||||
if(client.getClientUserName().equals(this.getClientUserName())){
|
||||
continue;
|
||||
}
|
||||
client.sendMsgToClient(Protocol.printToClientChat + "$" + clientUserName + ": " + msg);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user