mirror of https://github.com/calzoneman/sync.git
Add a temp bypass for initial rollout
This commit is contained in:
parent
b34a8fce3c
commit
e17dac58fd
|
@ -121,7 +121,17 @@ 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;
|
||||||
|
|
Loading…
Reference in New Issue