Beispiel #1
0
        static void Main(string[] args)
        {
            Console.WriteLine("POL Remote Login Server v" + progversion + " (VS.NET 2008)");
            Console.WriteLine("Copyright (C) 2009 POL Development Team");
            Console.WriteLine();

            try
            {
                if (!options.Load())
                {
                    Console.WriteLine("Unable to load options file! Exiting...");
                    Console.WriteLine();
                    Environment.Exit(1000);
                }
                Console.WriteLine("Options File Loaded...");

                if (options.MySQL_Active)
                {
                    LoginSQL MyConnection = new LoginSQL();

                    if (!MyConnection.CreateConnection())
                    {
                        Console.WriteLine("Unable to connect to the database. Exiting...");
                        Console.WriteLine();
                        Environment.Exit(1001);
                    }
                    Console.WriteLine("Connected to MySQL Database");
                    // MyConnection.LoadAccounts();
                    MyConnection.Close();
                }


                int port = options.LoginServer_Port;

                Console.WriteLine("Populating server list...");
                Console.WriteLine();

                PopulateList();
                server_list.ReportServers();

                Console.WriteLine("Starting listener on port {0}.", port);
                new Listener(port);

                Console.WriteLine("Login Server loaded.");
            }
            catch (Exception e)
            {
                Console.WriteLine("Error: {0}", e.Message);
            }

            Console.ReadLine();
        }
Beispiel #2
0
        static void Main(string[] args)
        {
            Console.WriteLine("POL Remote Login Server v" + progversion + " (VS.NET 2008)");
            Console.WriteLine("Copyright (C) 2009 POL Development Team");
            Console.WriteLine();

            try
            {
                if (!options.Load())
                {
                    Console.WriteLine("Unable to load options file! Exiting...");
                    Console.WriteLine();
                    Environment.Exit(1000);
                }
                Console.WriteLine("Options File Loaded...");

                if (options.MySQL_Active)
                {
                    LoginSQL MyConnection = new LoginSQL();

                    if (!MyConnection.CreateConnection())
                    {
                        Console.WriteLine("Unable to connect to the database. Exiting...");
                        Console.WriteLine();
                        Environment.Exit(1001);
                    }
                    Console.WriteLine("Connected to MySQL Database");
                    // MyConnection.LoadAccounts();
                    MyConnection.Close();
                }
                
    
                int port = options.LoginServer_Port;

                Console.WriteLine("Populating server list...");
                Console.WriteLine();

                PopulateList();
                server_list.ReportServers();              

                Console.WriteLine("Starting listener on port {0}.", port);
                new Listener(port);

                Console.WriteLine("Login Server loaded.");
            }
            catch (Exception e)
            {
                Console.WriteLine("Error: {0}", e.Message);
            }

            Console.ReadLine();
        }