Discord-for-TTT2 / dttt

Discord Integration for TTT2!
GNU General Public License v3.0
0 stars 0 forks source link

[BUG] Manually muted players getting unmuted #16

Open vertiKarl opened 4 months ago

vertiKarl commented 4 months ago

Describe the bug This actually makes sense. I'll try to explain. Currently we have two states for Mutes: manual and automatic. Automatic being used only by internal dttt logic (text sync, death, ...) And Manual being triggered externally by addons, for example the muter Dart.

This way it actually totally makes sense for it to unmute at the end of round as we have to reset the state of the players as they are not affected anymore.

But where this becomes and issue is Mutes via a command.

If we for example want to mute players that are misbehaving (moderation). We currently can only mute them for the round. (Sometimes not even that if they get revived)

To Reproduce Steps to reproduce the behavior:

  1. Mute manually
  2. End round
  3. Get automatically unmuted

Expected behavior Debatable. But a compromise I have would be to just add a check in the unmute hook to see if the player is silenced (i think thats also a ulx feature)

So something like this:


hook.Add("DTTTPreUnmute", function(ply)
    if ply:IsSilenced() then
        return false
    end
end

And maybe add another button to the player states to quickly silence players.

vertiKarl commented 4 months ago

Actually now that I think about it, it might even make sense to go back to the two state mute handling. As we could just require third party addons to cancel the automatic behavior. I actually like that more unfortunately.

vertiKarl commented 3 months ago

Might be worth looking into also synchronizing it with this menu? (is client side though)

Image