예제 #1
0
파일: IRCEngine.cs 프로젝트: Setz0r/Onyx
        static void ServerRehash(object sender, RehashEventArgs e)
        {
            var settings = new IRCSettings();

            settings.SetDaemon(e.IrcDaemon);
            settings.LoadSettings();
        }
예제 #2
0
파일: IRCEngine.cs 프로젝트: Setz0r/Onyx
        public void Run()
        {
            var settings  = new IRCSettings();
            var ircDaemon = new IrcDaemon(settings.GetIrcMode());

            settings.SetDaemon(ircDaemon);
            settings.LoadSettings();

            if (blocking)
            {
                ircDaemon.Start();
            }
            else
            {
                ircDaemon.ServerRehash += ServerRehash;

                var serverThread = new Thread(ircDaemon.Start)
                {
                    IsBackground = false,
                    Name         = "serverThread-1"
                };

                serverThread.Start();
            }
        }