Esempio n. 1
0
        static void Main(string[] args)
        {
            Console.Title = "IRC# Server";

            Server = new IrcServer();
            Config = new ServerConfig();

            Config.Load();
            Server.Hostname = Config.Host;

            for (int i = 0; i < Config.Ports.Length; i++)
            {
                int index = i;
                Thread thread = new Thread(() => Listen(index)) { IsBackground = true };
                thread.Start();
            }
            IrcServer.Logger.Log(LogLevel.Info, "Press ESC to exit.");
            while (Console.ReadKey().Key != ConsoleKey.Escape) ;
        }