Skip to content

Commit

Permalink
(feature) Send user state including selfmute and selfdeaf without hav…
Browse files Browse the repository at this point in the history
…ing to ut the move method which imposes to move channel.
  • Loading branch information
Meetsch committed Jun 30, 2019
1 parent 15e45b7 commit a1fe0c6
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions MumbleSharp/Model/User.cs
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,21 @@ public void Move(Channel channel)
_owner.Connection.SendControl<UserState>(PacketType.UserState, userstate);
}

/// <summary>
/// Send the user state (including channel, selfmute, selfdeaf)
/// </summary>
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<UserState>(PacketType.UserState, userstate);
}

protected internal IVoiceCodec GetCodec(SpeechCodecs codec)
{
return _codecs.GetCodec(codec);
Expand Down

0 comments on commit a1fe0c6

Please sign in to comment.