wmib.Instance.JoinAll C# (CSharp) Method

JoinAll() private method

This is a private handler for channel joining, never call it directly, use Join() for that
private JoinAll ( ) : void
return void
        private void JoinAll()
        {
            try
            {
                if (this.ChannelsJoined == false)
                {
                    while (!this.IsWorking)
                    {
                        if (!this.IsActive || !Core.IsRunning)
                        {
                            Core.ThreadManager.UnregisterThread(Thread.CurrentThread);
                            return;
                        }
                        Syslog.DebugLog("JOIN THREAD: Waiting for " + Nick + " to finish connection to IRC server", 6);
                        Thread.Sleep(1000);
                    }
                    if (Configuration.System.DebugChan != null)
                    {
                        this.Network.Join(Configuration.System.DebugChan);
                    }
                    foreach (Channel channel in ChannelList)
                    {
                        if (channel.Name.Length > 0 && channel.Name != Configuration.System.DebugChan)
                        {
                            Syslog.DebugLog("Joining " + channel.Name + " on " + Nick);
                            this.Network.Join(channel.Name, channel.Password);
                            Thread.Sleep(1000);
                        }
                    }
                    this.ChannelsJoined = true;
                }
            }
            catch (Exception fail)
            {
                Core.HandleException(fail);
            }
            Core.ThreadManager.UnregisterThread(Thread.CurrentThread);
        }