diff --git a/lib/channel.js b/lib/channel.js index fa0fec9e..a6106119 100644 --- a/lib/channel.js +++ b/lib/channel.js @@ -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; diff --git a/www/assets/js/channelsettings.js b/www/assets/js/channelsettings.js index 0492b29b..813ea4b3 100644 --- a/www/assets/js/channelsettings.js +++ b/www/assets/js/channelsettings.js @@ -81,8 +81,7 @@ chat_antiflood: $("#opt_chat_antiflood").prop("checked"), chat_antiflood_params: { burst: $("#opt_chat_antiflood_burst").val(), - sustained: $("#opt_chat_antiflood_sustained").val(), - cooldown: $("#opt_chat_antiflood_cooldown").val() + sustained: $("#opt_chat_antiflood_sustained").val() }, show_public: $("#opt_show_public").prop("checked"), enable_link_regex: $("#opt_enable_link_regex").prop("checked"), diff --git a/www/assets/js/util.js b/www/assets/js/util.js index 0fc13436..266f3985 100644 --- a/www/assets/js/util.js +++ b/www/assets/js/util.js @@ -1012,7 +1012,6 @@ function handleModPermissions() { $("#opt_chat_antiflood").prop("checked", CHANNEL.opts.chat_antiflood); $("#opt_chat_antiflood_burst").val(CHANNEL.opts.chat_antiflood_params.burst); $("#opt_chat_antiflood_sustained").val(CHANNEL.opts.chat_antiflood_params.sustained); - $("#opt_chat_antiflood_cooldown").val(CHANNEL.opts.chat_antiflood_params.cooldown); $("#opt_show_public").prop("checked", CHANNEL.opts.show_public); $("#opt_show_public").attr("disabled", CLIENT.rank < 3); $("#opt_enable_link_regex").prop("checked", CHANNEL.opts.enable_link_regex); diff --git a/www/channeloptions.html b/www/channeloptions.html index a01d456f..4429d535 100644 --- a/www/channeloptions.html +++ b/www/channeloptions.html @@ -43,13 +43,6 @@ - -
- -
- -
-