This commit is contained in:
brausjonas
2023-01-29 00:25:54 +01:00
parent a6dd6752c1
commit da8ce4b425
19 changed files with 950 additions and 22 deletions
+6 -1
View File
@@ -78,9 +78,14 @@ public class Server
String roomCode = new String(readData, StandardCharsets.US_ASCII);
input.read(readData);
String name = new String(readData, StandardCharsets.US_ASCII);
name = name.replace("?", " ");
if(rooms.containsKey(roomCode))
{
Client client1 = new Client(output, input, client);
Client client1 = new Client(output, input, client, name);
rooms.get(roomCode).addClient(client1);
}