Esempio n. 1
0
        public IRC()
        {
            f_Client = new IrcClient();
            f_Client.Encoding = Encoding.UTF8;
            f_Client.SendDelay = 200;
            f_Client.ActiveChannelSyncing = true;

            //Set up our listener worker background thread. This worker will listen for messages from the irc server.
            listenerWorker = new BackgroundWorker();
            listenerWorker.DoWork += (bwSender, bwArgs) =>
            {
                while (f_IsListening)
                {
                    //We use listen once because we need to check to see if we should continue each cycle
                    f_Client.ListenOnce();
                    Thread.Sleep(100);
                }
            };
        }