mirror of
https://github.com/magefree/mage.git
synced 2025-12-23 03:51:58 -08:00
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:
parent
19fec8ee2a
commit
f68460603a
22 changed files with 443 additions and 18 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue