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

@ -41,6 +41,7 @@ import mage.client.SessionHandler;
import mage.client.components.MageComponents;
import mage.client.table.TablePlayerPanel;
import mage.client.util.Event;
import mage.client.util.IgnoreList;
import mage.client.util.Listener;
import mage.constants.MatchTimeLimit;
import mage.constants.MultiplayerAttackOption;
@ -386,6 +387,8 @@ public class NewTableDialog extends MageDialog {
options.setPassword(this.txtPassword.getText());
options.setQuitRatio((Integer) this.spnQuitRatio.getValue());
options.setEdhPowerLevel((Integer) this.spnEdhPowerLevel.getValue());
String serverAddress = SessionHandler.getSession().getServerHostname().orElseGet(() -> "");
options.setBannedUsers(IgnoreList.ignoreList(serverAddress));
if (!checkMatchOptions(options)) {
return;
}