From 31eccb8e7f38dd240ced2bedefa15d2ab7d1ffb2 Mon Sep 17 00:00:00 2001 From: barisusakli Date: Mon, 15 Sep 2014 17:01:20 -0400 Subject: [PATCH] configurable post delay before first post --- install/data/defaults.json | 4 ++++ public/language/en_GB/error.json | 1 + src/database/redis/sorted.js | 1 + src/user.js | 13 +++++++------ 4 files changed, 13 insertions(+), 6 deletions(-) diff --git a/install/data/defaults.json b/install/data/defaults.json index 0ecd7b5fd1..1443cab11b 100644 --- a/install/data/defaults.json +++ b/install/data/defaults.json @@ -7,6 +7,10 @@ "field": "postDelay", "value": 10 }, + { + "field": "initialPostDelay", + "value": 10 + }, { "field": "minimumPostLength", "value": 8 diff --git a/public/language/en_GB/error.json b/public/language/en_GB/error.json index 15874226dd..62908a30db 100644 --- a/public/language/en_GB/error.json +++ b/public/language/en_GB/error.json @@ -27,6 +27,7 @@ "username-too-long": "Username too long", "user-banned": "User banned", + "user-too-new": "You need to wait %1 seconds before making your first post!", "no-category": "Category doesn't exist", "no-topic": "Topic doesn't exist", diff --git a/src/database/redis/sorted.js b/src/database/redis/sorted.js index 36ef4f6c73..900497c087 100644 --- a/src/database/redis/sorted.js +++ b/src/database/redis/sorted.js @@ -56,6 +56,7 @@ module.exports = function(redisClient, module) { }; module.sortedSetsRemoveRangeByScore = function(keys, min, max, callback) { + callback = callback || function() {}; var multi = redisClient.multi(); for(var i=0; i