diff --git a/Mage.Server/src/main/java/mage/server/ChatManager.java b/Mage.Server/src/main/java/mage/server/ChatManager.java index 521fd616b0..b8f655733f 100644 --- a/Mage.Server/src/main/java/mage/server/ChatManager.java +++ b/Mage.Server/src/main/java/mage/server/ChatManager.java @@ -132,6 +132,10 @@ public class ChatManager { chatSessions.get(chatId).broadcastInfoToUser(user, informUser); return; } + + if (message.length() > 500) { + message = message.replaceFirst("^(.{500}).*", "$1 (rest of message truncated)"); + } String messageToCheck = message; Matcher matchPattern = cardNamePattern.matcher(message);