mirror of https://github.com/calzoneman/sync.git
Exclude mods from chat throttle, add extra description to options
This commit is contained in:
parent
ee9b19b0ff
commit
d36dcc5352
|
@ -2243,15 +2243,9 @@ Channel.prototype.tryChat = function(user, data) {
|
||||||
msg = msg.substring(0, 240);
|
msg = msg.substring(0, 240);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.opts.chat_antiflood &&
|
if (user.rank < 2 && this.opts.chat_antiflood &&
|
||||||
user.chatLimiter.throttle(this.opts.chat_antiflood_params)) {
|
user.chatLimiter.throttle(this.opts.chat_antiflood_params)) {
|
||||||
user.socket.emit("chatCooldown", 1000/this.opts.chat_antiflood_params.sustained);
|
user.socket.emit("chatCooldown", 1000/this.opts.chat_antiflood_params.sustained);
|
||||||
/*
|
|
||||||
user.socket.emit("noflood", {
|
|
||||||
action: "chat",
|
|
||||||
msg: "sending messages too quickly!"
|
|
||||||
});
|
|
||||||
*/
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -31,21 +31,21 @@
|
||||||
</div>
|
</div>
|
||||||
<!-- chat flood burst -->
|
<!-- chat flood burst -->
|
||||||
<div class="control-group">
|
<div class="control-group">
|
||||||
<label class="control-label" for="opt_chat_antiflood_burst"># of messages allowed before throttling</label>
|
<label class="control-label" for="opt_chat_antiflood_burst" title="The number of messages someone can send with no restriction before the rate limit is applied"># of messages allowed before throttling</label>
|
||||||
<div class="controls">
|
<div class="controls">
|
||||||
<input type="text" id="opt_chat_antiflood_burst">
|
<input type="text" id="opt_chat_antiflood_burst">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- chat flood sustained -->
|
<!-- chat flood sustained -->
|
||||||
<div class="control-group">
|
<div class="control-group">
|
||||||
<label class="control-label" for="opt_chat_antiflood_sustained"># of messages allowed per second (sustained)</label>
|
<label class="control-label" for="opt_chat_antiflood_sustained" title="The number of messages (after the burst is exceeded) per second a non-moderator can send"># of messages allowed per second (sustained)</label>
|
||||||
<div class="controls">
|
<div class="controls">
|
||||||
<input type="text" id="opt_chat_antiflood_sustained">
|
<input type="text" id="opt_chat_antiflood_sustained">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- chat flood cooldown -->
|
<!-- chat flood cooldown -->
|
||||||
<div class="control-group">
|
<div class="control-group">
|
||||||
<label class="control-label" for="opt_chat_antiflood_cooldown">Cooldown time after being throttled (seconds)</label>
|
<label class="control-label" for="opt_chat_antiflood_cooldown" title="The number of seconds since the last message before someone can burst again">Cooldown time after being throttled (seconds)</label>
|
||||||
<div class="controls">
|
<div class="controls">
|
||||||
<input type="text" id="opt_chat_antiflood_cooldown">
|
<input type="text" id="opt_chat_antiflood_cooldown">
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue