Archived
msg wont be sent to self from server now even when not in lobby
This commit is contained in:
1 parent
1943e8c86b
commit
5e50905f81
1 file changed
+3
@@ -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