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