Add client-side user ignore list

This commit adds a client-side per-server ignore list.
* Whispers and talk from an ignored user is hidden
* Ignored users cannot join your tables
* Ignored users tables are hidden
This commit is contained in:
Anders Åstrand 2017-02-22 20:17:26 +01:00
parent 19fec8ee2a
commit f68460603a
22 changed files with 443 additions and 18 deletions

View file

@ -244,6 +244,10 @@ public class SessionImpl implements Session {
});
}
public Optional<String> getServerHostname() {
return isConnected() ? Optional.of(connection.getHost()) : Optional.<String>empty();
}
@Override
public boolean stopConnecting() {
canceled = true;
@ -960,6 +964,8 @@ public class SessionImpl implements Session {
return false;
}
@Override
public boolean joinGame(UUID gameId) {
try {

View file

@ -29,6 +29,8 @@ package mage.remote.interfaces;
import mage.remote.Connection;
import java.util.Optional;
/**
* @author noxx
*/
@ -52,6 +54,8 @@ public interface Connect {
boolean isConnected();
Optional<String> getServerHostname();
boolean disconnectUser(String userSessionId);
boolean endUserSession(String userSessionId);

View file

@ -49,7 +49,7 @@ public class ChatMessage implements Serializable {
}
public enum MessageType {
USER_INFO, STATUS, GAME, TALK, WHISPER
USER_INFO, STATUS, GAME, TALK, WHISPER_FROM, WHISPER_TO
}
public enum SoundToPlay {