Esempio n. 1
0
 public void DestroyBroadcast()
 {
     SpecialGuests.Clear();
     Library.Remora.DestroyQueue();
 }
Esempio n. 2
0
        public void CreateBroadcast(String p_Name, String p_Description, CategoryTag p_Tag)
        {
            if (Library.User.Data == null)
            {
                return;
            }

            SpecialGuests.Clear();
            CurrentBroadcastName        = p_Name;
            CurrentBroadcastDescription = p_Description;
            CurrentBroadcastCategoryTag = p_Tag;
            ActiveBroadcastID           = null;
            Data = null;

            if (Library.Chat.LoggedInMaster != null && Library.Chat.LoggedInMaster.CurrentBroadcast != null)
            {
                ActiveBroadcastID       = Library.Chat.LoggedInMaster.CurrentBroadcast;
                CurrentBroadcastPicture = null;
                Data = new BroadcastData()
                {
                };

                // Check if broadcast still exists.
                Library.Chat.GetSubscriptionData(Library.Chat.GetChatChannel(ActiveBroadcastID), new List <String>()
                {
                    "s",
                    "h",
                    "owners",
                    "n",
                    "t",
                    "owner_subscribed",
                    "i",
                    "d",
                    "tl",
                    "py",
                    "qc"
                }, OnBroadcastSubscriptionData);

                return;
            }

            var s_LastBroadcast = GetLastBroadcast();

            if (s_LastBroadcast != null)
            {
                ActiveBroadcastID       = s_LastBroadcast.BroadcastID;
                CurrentBroadcastPicture = null;
                Data = s_LastBroadcast;

                // Check if broadcast still exists.
                Library.Chat.GetSubscriptionData(Library.Chat.GetChatChannel(ActiveBroadcastID), new List <String>()
                {
                    "s",
                    "h",
                    "owners",
                    "n",
                    "t",
                    "owner_subscribed",
                    "i",
                    "d",
                    "tl",
                    "py",
                    "qc"
                }, OnBroadcastSubscriptionData);

                return;
            }

            Library.Remora.JoinControlChannels();
        }