Esempio n. 1
0
        public static void LeaveRadioChannel(VoiceClient voiceClient, bool primary)
        {
            foreach (RadioChannelMember membership in VoiceManager.GetPlayerRadioChannelMembership(voiceClient).Where(m => m.IsPrimary == primary))
            {
                membership.RadioChannel.RemoveMember(voiceClient);

                if (membership.RadioChannel.Members.Length == 0)
                {
                    lock (VoiceManager._radioChannels)
                    {
                        VoiceManager._radioChannels.Remove(membership.RadioChannel);
                    }
                }
            }
        }
Esempio n. 2
0
        public static void LeaveRadioChannel(VoiceClient voiceClient, string radioChannelName)
        {
            foreach (RadioChannelMember membership in VoiceManager.GetPlayerRadioChannelMembership(voiceClient).Where(m => m.RadioChannel.Name == radioChannelName))
            {
                membership.RadioChannel.RemoveMember(voiceClient);

                if (membership.RadioChannel.Members.Length == 0)
                {
                    lock (VoiceManager._radioChannels)
                    {
                        VoiceManager._radioChannels.Remove(membership.RadioChannel);
                    }
                }
            }
        }