Implement Auto-AFK (#192)
- Channel-configurable delay - User is marked AFK if no chat messages are received before the delay expires - User is marked un-AFK if a chat message is received or if the user voteskips
This commit is contained in:
parent
1150d03474
commit
77a57d24c1
6 changed files with 60 additions and 20 deletions
|
|
@ -69,7 +69,8 @@
|
|||
externaljs: $("#opt_externaljs").val(),
|
||||
chat_antiflood: $("#opt_chat_antiflood").prop("checked"),
|
||||
show_public: $("#opt_show_public").prop("checked"),
|
||||
enable_link_regex: $("#opt_enable_link_regex").prop("checked")
|
||||
enable_link_regex: $("#opt_enable_link_regex").prop("checked"),
|
||||
afk_timeout: parseInt($("#opt_afktimeout").val())
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -779,6 +779,7 @@ function handleModPermissions() {
|
|||
$("#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);
|
||||
$("#opt_afktimeout").val(CHANNEL.opts.afk_timeout);
|
||||
$("#opt_allow_voteskip").prop("checked", CHANNEL.opts.allow_voteskip);
|
||||
$("#opt_voteskip_ratio").val(CHANNEL.opts.voteskip_ratio);
|
||||
(function() {
|
||||
|
|
|
|||
|
|
@ -56,6 +56,13 @@
|
|||
<input type="text" id="opt_maxlength" placeholder="HH:MM:SS">
|
||||
</div>
|
||||
</div>
|
||||
<!-- auto afk -->
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="opt_afktimeout">Auto AFK Delay (0 to disable)</label>
|
||||
<div class="controls">
|
||||
<input type="text" id="opt_afktimeout" placeholder="0">
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<strong>Admin-Only Controls</strong>
|
||||
<!-- page title -->
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue