Exemplo n.º 1
0
        //need to make a TwitchChannel.cs
        //use it to store the channel names????
        //idk will have to think about how to tackle this at a later date
        public TwitchChatRoom(TwitchChatConnection chatConnection,
            TwitchChatConnection whisperConnection, TwitchChannel channel)
        {
            this._chatConnection = chatConnection;
            this._whisperConnection = whisperConnection;
            this._channel = channel;

            chatConnection.Join(this);
            ///joins the chat connection
        }
Exemplo n.º 2
0
        internal void Run()
        {
            //???
            TwitchChatConnection chatConnection = new TwitchChatConnection(IrcBot, false),
                whisperConnection = new TwitchChatConnection(bot, true);

            ///add the linkedlist
            LinkedList<TwitchChannel> channels = new LinkedList<TwitchChannel>();
            channels.AddLast(new TwitchChannel(userBot));
            ////As many channels as we want

            foreach (TwitchChannel channel in channels)
            {
            new TwitchChatRoom(chatConnection, whisperConnection, channel);
            }

            new Thread(new ThreadStart(chatConnection.Run)).Start();
            whisperConnection.Run();
        }