showing proper time for newbie post delay

v1.18.x
Julian Lam 10 years ago
parent d2cddc734b
commit 54ee8e59f6

@ -186,7 +186,7 @@ var async = require('async'),
var lastposttime = userData.lastposttime || 0; var lastposttime = userData.lastposttime || 0;
if (parseInt(meta.config.newbiePostDelay, 10) > 0 && parseInt(meta.config.newbiePostDelayThreshold, 10) > parseInt(userData.reputation, 10) && now - parseInt(lastposttime, 10) < parseInt(meta.config.newbiePostDelay, 10) * 1000) { if (parseInt(meta.config.newbiePostDelay, 10) > 0 && parseInt(meta.config.newbiePostDelayThreshold, 10) > parseInt(userData.reputation, 10) && now - parseInt(lastposttime, 10) < parseInt(meta.config.newbiePostDelay, 10) * 1000) {
return callback(new Error('[[error:too-many-posts-newbie, ' + meta.config.postDelay + ', ' + meta.config.newbiePostDelayThreshold + ']]')); return callback(new Error('[[error:too-many-posts-newbie, ' + meta.config.newbiePostDelay + ', ' + meta.config.newbiePostDelayThreshold + ']]'));
} else if (now - parseInt(lastposttime, 10) < parseInt(meta.config.postDelay, 10) * 1000) { } else if (now - parseInt(lastposttime, 10) < parseInt(meta.config.postDelay, 10) * 1000) {
return callback(new Error('[[error:too-many-posts, ' + meta.config.postDelay + ']]')); return callback(new Error('[[error:too-many-posts, ' + meta.config.postDelay + ']]'));
} }

Loading…
Cancel
Save