Change default for new account delays to 0

This commit is contained in:
Calvin Montgomery 2016-09-14 22:05:50 -07:00
parent cbfbf396dd
commit 1b1d2596f8
2 changed files with 2 additions and 12 deletions

View File

@ -121,17 +121,7 @@ ChatModule.prototype.shadowMutedUsers = function () {
}); });
}; };
const SERVER_START_DATE = Date.now();
ChatModule.prototype.restrictNewAccount = function restrictNewAccount(user, data) { ChatModule.prototype.restrictNewAccount = function restrictNewAccount(user, data) {
// TODO: this is temporary to prevent hundreds of guests from getting
// blocked immediately after this feature is rolled out.
//
// Will be removed later.
if (SERVER_START_DATE + this.channel.modules.options.get("new_user_chat_delay")*1000
>= Date.now()) {
return false;
}
if (user.account.effectiveRank < 2 && this.channel.modules.options) { if (user.account.effectiveRank < 2 && this.channel.modules.options) {
const firstSeen = user.getFirstSeenTime(); const firstSeen = user.getFirstSeenTime();
const opts = this.channel.modules.options; const opts = this.channel.modules.options;

View File

@ -26,8 +26,8 @@ function OptionsModule(channel) {
torbanned: false, // Block connections from Tor exit nodes torbanned: false, // Block connections from Tor exit nodes
allow_ascii_control: false,// Allow ASCII control characters (\x00-\x1f) allow_ascii_control: false,// Allow ASCII control characters (\x00-\x1f)
playlist_max_per_user: 0, // Maximum number of playlist items per user playlist_max_per_user: 0, // Maximum number of playlist items per user
new_user_chat_delay: 10 * 60, // Minimum account/IP age to chat new_user_chat_delay: 0, // Minimum account/IP age to chat
new_user_chat_link_delay: 60 * 60 // Minimum account/IP age to post links new_user_chat_link_delay: 0 // Minimum account/IP age to post links
}; };
} }