Improve remove chatter
This commit is contained in:
@@ -30,8 +30,10 @@ public class ChatServer {
|
||||
chat.sendMessage(NAME, String.format("Hoi %s!", name));
|
||||
}
|
||||
|
||||
public void removeChatter(Chat chat){
|
||||
chatters.remove(chat);
|
||||
public void removeChatter(Chat chat, Map props){
|
||||
String name = (String) props.get("participant.name");
|
||||
System.out.printf("Removing %s%n", name);
|
||||
chatters.remove(name);
|
||||
}
|
||||
|
||||
public void send(String name, String message){
|
||||
|
||||
Reference in New Issue
Block a user