Set the cap for max-chat-message-length to 1000

This commit is contained in:
Kethsar 2023-03-25 01:18:05 -07:00 committed by Calvin Montgomery
parent 21d7f16413
commit 2c541448a2
2 changed files with 6 additions and 1 deletions

View File

@ -128,7 +128,7 @@ max-channels-per-user: 5
max-accounts-per-ip: 5
# Minimum number of seconds between guest logins from the same IP
guest-login-delay: 60
# Maximum character length of a chat message
# Maximum character length of a chat message, capped at 1000 characters
max-chat-message-length: 320
# Allows you to customize the path divider. The /r/ in http://localhost/r/yourchannel

View File

@ -428,6 +428,11 @@ function preprocessConfig(cfg) {
cfg['channel-storage'] = { type: undefined };
}
if (cfg["max-chat-message-length"] > 1000) {
LOGGER.warn("Max chat message length was greater than 1000. Setting to 1000.");
cfg["max-chat-message-length"] = 1000;
}
return cfg;
}