Schumix.Irc.IrcBase.AllIrcServerShutdown C# (CSharp) Method

AllIrcServerShutdown() public method

public AllIrcServerShutdown ( string Message, bool reload = false ) : void
Message string
reload bool
return void
        public void AllIrcServerShutdown(string Message, bool reload = false)
        {
            foreach(var nw in _networks)
                nw.Value.sSender.Quit(Message);

            int i = 0;

            while(true)
            {
                if(i >= 30 && !reload)
                    break;

                var list = new List<bool>();

                foreach(var nw in _networks)
                    list.Add(nw.Value.Shutdown);

                if(list.CompareDataInBlock())
                {
                    list.Clear();
                    break;
                }
                else
                    Thread.Sleep(200);

                i++;
                list.Clear();
            }
        }