/// <summary>
        /// Sent by the server when a channel has been removed and clients should be notified.
        /// </summary>
        /// <param name="channelRemove"></param>
        public virtual void ChannelRemove(ChannelRemove channelRemove)
        {
            Channel c;

            if (ChannelDictionary.TryRemove(channelRemove.ChannelId, out c))
            {
                ChannelLeft(c);
            }
        }
示例#2
0
 private void processChannelRemove(ChannelRemove channelRemove)
 {
     if (!(_mumbleChannels.Remove(channelRemove.ChannelId)))
     {
         _logger.LogError($"Server requested removal of channel ID " +
                          $"'{channelRemove.ChannelId}' that does not exist in cache.");
     }
     else
     {
         _logger.LogInformation($"Received channel removal for ID " +
                                $"'{channelRemove.ChannelId}'.");
     }
     updateChannelStore();
 }
示例#3
0
        /// <summary>
        /// Destroy the channel on the server
        /// The user must have the admin rights
        /// </summary>
        /// <param name="channelName">The name of the channel you want to remove</param>
        public void DestroyChannel(string channelName)
        {
            Channel channel;

            if (!TryGetChannelByName(channelName, out channel))
            {
                Debug.LogError("channel :" + channelName + " to remove not found!");
                return;
            }

            ChannelRemove channeltoremove = new ChannelRemove
            {
                ChannelId = channel.ChannelId
            };

            _tcpConnection.SendMessage <MumbleProto.ChannelRemove>(MessageType.ChannelRemove, channeltoremove);

            return;
        }
 /// <summary>
 /// Sent by the client when it wants a channel removed.
 /// </summary>
 /// <param name="channelRemove"></param>
 public void SendChannelRemove(ChannelRemove channelRemove)
 {
     Connection.SendControl(PacketType.ChannelRemove, channelRemove);
 }
 protected virtual void OnChannelRemove(uint firstNodeId, uint secondNodeId)
 {
     ChannelRemove?.Invoke(firstNodeId, secondNodeId);
 }
示例#6
0
 /// <summary>
 /// Server has removed a channel
 /// </summary>
 /// <param name="channelRemove"></param>
 public virtual void ChannelRemove(ChannelRemove channelRemove)
 {
     Channel c;
     ChannelDictionary.TryRemove(channelRemove.channel_id, out c);
 }
示例#7
0
        /// <summary>
        /// Server has removed a channel
        /// </summary>
        /// <param name="channelRemove"></param>
        public virtual void ChannelRemove(ChannelRemove channelRemove)
        {
            Channel c;

            ChannelDictionary.TryRemove(channelRemove.channel_id, out c);
        }