forked from External/mage
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
|
|
@ -271,8 +271,8 @@ public class ChatPanelBasic extends javax.swing.JPanel {
|
|||
if (color.equals(MessageColor.YELLOW)) {
|
||||
textColor = "Yellow";
|
||||
}
|
||||
if (messageType == MessageType.WHISPER) {
|
||||
if (username.equalsIgnoreCase("Whisper from " + SessionHandler.getUserName())) {
|
||||
if (messageType == MessageType.WHISPER_FROM) {
|
||||
if (username.equalsIgnoreCase(SessionHandler.getUserName())) {
|
||||
if (message.toLowerCase().startsWith("profanity 0")) {
|
||||
PreferencesDialog.saveValue(PreferencesDialog.KEY_GAME_USE_PROFANITY_FILTER, "0");
|
||||
} else if (message.toLowerCase().startsWith("profanity 1")) {
|
||||
|
|
@ -281,6 +281,10 @@ public class ChatPanelBasic extends javax.swing.JPanel {
|
|||
PreferencesDialog.saveValue(PreferencesDialog.KEY_GAME_USE_PROFANITY_FILTER, "2");
|
||||
}
|
||||
}
|
||||
username = "Whisper from " + username;
|
||||
}
|
||||
if (messageType == MessageType.WHISPER_TO) {
|
||||
username = "Whisper to " + username;
|
||||
}
|
||||
|
||||
Matcher matchPattern = cardNamePattern.matcher(message);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue