mirror of
https://github.com/correl/mage.git
synced 2024-12-26 03:00:11 +00:00
Merge pull request #2876 from spjspj/master
Limit messages to 500 characters
This commit is contained in:
commit
24c08e14e4
1 changed files with 4 additions and 0 deletions
|
@ -133,6 +133,10 @@ public class ChatManager {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (message.length() > 500) {
|
||||||
|
message = message.replaceFirst("^(.{500}).*", "$1 (rest of message truncated)");
|
||||||
|
}
|
||||||
|
|
||||||
String messageToCheck = message;
|
String messageToCheck = message;
|
||||||
Matcher matchPattern = cardNamePattern.matcher(message);
|
Matcher matchPattern = cardNamePattern.matcher(message);
|
||||||
while (matchPattern.find()) {
|
while (matchPattern.find()) {
|
||||||
|
|
Loading…
Reference in a new issue