diff --git a/config.template.yaml b/config.template.yaml index f267b1fc..03c307fa 100644 --- a/config.template.yaml +++ b/config.template.yaml @@ -129,7 +129,7 @@ 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 -max-chat-msg-length: 320 +max-chat-message-length: 320 # Allows you to customize the path divider. The /r/ in http://localhost/r/yourchannel # Acceptable characters are a-z A-Z 0-9 _ and - diff --git a/src/channel/chat.js b/src/channel/chat.js index f14162e6..d2636bc0 100644 --- a/src/channel/chat.js +++ b/src/channel/chat.js @@ -162,7 +162,7 @@ ChatModule.prototype.handleChatMsg = function (user, data) { return; } - data.msg = data.msg.substring(0, Config.get("max-chat-msg-length")); + data.msg = data.msg.substring(0, Config.get("max-chat-message-length")); // Restrict new accounts/IPs from chatting and posting links if (this.restrictNewAccount(user, data)) { @@ -248,7 +248,7 @@ ChatModule.prototype.handlePm = function (user, data) { } - data.msg = data.msg.substring(0, Config.get("max-chat-msg-length")); + data.msg = data.msg.substring(0, Config.get("max-chat-message-length")); var to = null; for (var i = 0; i < this.channel.users.length; i++) { if (this.channel.users[i].getLowerName() === data.to) { diff --git a/src/web/routes/channel.js b/src/web/routes/channel.js index 4f24a91d..89be413c 100644 --- a/src/web/routes/channel.js +++ b/src/web/routes/channel.js @@ -29,7 +29,7 @@ export default function initialize(app, ioConfig, chanPath, getBannedChannel) { sendPug(res, 'channel', { channelName: req.params.channel, sioSource: `${socketBaseURL}/socket.io/socket.io.js`, - maxMsgLen: Config.get("max-chat-msg-length") + maxMsgLen: Config.get("max-chat-message-length") }); }); }