diff --git a/MumbleSharp/Model/User.cs b/MumbleSharp/Model/User.cs index 9a65fb0..ac41b0f 100644 --- a/MumbleSharp/Model/User.cs +++ b/MumbleSharp/Model/User.cs @@ -87,6 +87,21 @@ public void Move(Channel channel) _owner.Connection.SendControl(PacketType.UserState, userstate); } + /// + /// Send the user state (including channel, selfmute, selfdeaf) + /// + public void SendUserState() + { + UserState userstate = new UserState(); + userstate.Actor = this.Id; + userstate.Session = _owner.LocalUser.Id; + userstate.ChannelId = this.Channel.Id; + userstate.SelfMute = this.SelfMuted; + userstate.SelfDeaf = this.SelfDeaf; + + _owner.Connection.SendControl(PacketType.UserState, userstate); + } + protected internal IVoiceCodec GetCodec(SpeechCodecs codec) { return _codecs.GetCodec(codec);