Fixed muting so that it should be consistant. meaning, if a muted user leaves and comes back they should still be muted. Channel mute and unmute now specifically sets mute/unmute for each user so the whole channel is in deed muted or unmuted.
This commit is contained in:
@ -142,9 +142,12 @@ func (b *Barnard) OnUserChange(e *gumble.UserChangeEvent) {
|
||||
|
||||
// Check if user is joining a muted channel
|
||||
if e.Type.Has(gumble.UserChangeConnected) || e.Type.Has(gumble.UserChangeChannel) {
|
||||
// If the channel is muted, mute the new user
|
||||
// If the channel is muted, ensure the user is muted
|
||||
if b.MutedChannels[e.User.Channel.ID] {
|
||||
b.UserConfig.ToggleMute(e.User)
|
||||
// Only mute if not already muted
|
||||
if !e.User.LocallyMuted {
|
||||
b.UserConfig.ToggleMute(e.User)
|
||||
}
|
||||
if e.User.AudioSource != nil {
|
||||
e.User.AudioSource.SetGain(0)
|
||||
}
|
||||
|
Reference in New Issue
Block a user