CHATA now doesn't send chatmsg to sender gui
This commit is contained in:
parent
5e50905f81
commit
8926eaa8f8
@ -216,6 +216,9 @@ public class ClientHandler implements Runnable {
|
|||||||
*/
|
*/
|
||||||
public void broadcastChatMessageToAll(String msg) {
|
public void broadcastChatMessageToAll(String msg) {
|
||||||
for (ClientHandler client : connectedClients) {
|
for (ClientHandler client : connectedClients) {
|
||||||
|
if(client.getClientUserName().equals(this.getClientUserName())){
|
||||||
|
continue;
|
||||||
|
}
|
||||||
client.sendMsgToClient(Protocol.printToClientChat + "$" + clientUserName + ": " + msg);
|
client.sendMsgToClient(Protocol.printToClientChat + "$" + clientUserName + ": " + msg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user