コード例 #1
0
ファイル: Program.cs プロジェクト: willoughbyb/IRCSharp
        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)
            {
                ;
            }
        }
コード例 #2
0
ファイル: Program.cs プロジェクト: seaboy1234/IRCSharp
        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) ;
        }
コード例 #3
0
ファイル: Program.cs プロジェクト: caryhooper/IRCSharp
        static void Main(string[] args)
        {
            Console.Title = "IRC# Server";

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

            string TLS_string = "--tls";

            foreach (string argument in args)
            {
                if (argument == TLS_string)
                {
                    IrcServer.Logger.Log(LogLevel.Info, $"--tls detected");
                    Config.TLS = true;
                    break;
                }
                else
                {
                    IrcServer.Logger.Log(LogLevel.Info, $"No TLS");
                    Config.TLS = false;
                }
            }
            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)
            {
                ;
            }
        }