Automatically calculate cooldown
This commit is contained in:
parent
d36dcc5352
commit
714d302cf9
4 changed files with 2 additions and 13 deletions
|
|
@ -2111,9 +2111,7 @@ Channel.prototype.tryUpdateOptions = function(user, data) {
|
|||
var s = parseFloat(data[key].sustained);
|
||||
if (isNaN(s) || s <= 0)
|
||||
s = 1;
|
||||
var c = parseFloat(data[key].cooldown);
|
||||
if (isNaN(c) || c < 0)
|
||||
c = 0;
|
||||
var c = b / s;
|
||||
this.opts.chat_antiflood_params.burst = b;
|
||||
this.opts.chat_antiflood_params.sustained = s;
|
||||
this.opts.chat_antiflood_params.cooldown = c;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue