Limit messages to 500 characters
@@ -133,6 +133,10 @@ public class ChatManager {
return;
}
+ if (message.length() > 500) {
+ message = message.replaceFirst("^(.{500}).*", "$1 (rest of message truncated)");
+ }
+
String messageToCheck = message;
Matcher matchPattern = cardNamePattern.matcher(message);
while (matchPattern.find()) {
