예제 #1
0
        public static void Load(string name)
        {
            var conf = new IniReader(string.Format("conf/{0}.ini", name));

            channelLog    = Convert.ToBoolean(conf.GetValue("debug", "use", 0));
            channelLogLvl = conf.GetValue("debug", "level", 0);

            channelIp   = IPAddress.Parse(conf.GetValue("listen", "ip", "127.0.0.1"));
            channelPort = conf.GetValue("listen", "port", 0);
            channelType = conf.GetValue("channel", "type", 0);
            maxPlayers  = conf.GetValue("channel", "max_players", 0);

            masterIP   = conf.GetValue("master", "ip", "localhost");
            masterPort = conf.GetValue("master", "port", 0);
        }
예제 #2
0
        public static void Load()
        {
            var conf = new IniReader("conf/Master.ini");

            IP          = conf.GetValue("listen", "ip", "0.0.0.0");
            LoginDBType = conf.GetValue("logindb", "type", "");
            LoginDB     = conf.GetValue("logindb", "name", "");
            LoginDBIP   = conf.GetValue("logindb", "ip", "");
            LoginDBUser = conf.GetValue("logindb", "user", "");
            LoginDBPass = conf.GetValue("logindb", "password", "");

            ServerDBs      = new Dictionary <int, string>();
            ServerDBIPs    = new Dictionary <int, string>();
            ServerDBUsers  = new Dictionary <int, string>();
            ServerDBPasses = new Dictionary <int, string>();
            ServerDBTypes  = new Dictionary <int, string>();
        }
예제 #3
0
        public static void Load()
        {
            var conf = new IniReader("conf/Login.ini");

            IP   = IPAddress.Parse(conf.GetValue("listen", "ip", ""));
            Port = conf.GetValue("listen", "port", 0);

            ClientVersion       = conf.GetValue("client", "client_version", 0);
            NormalMagicKey      = conf.GetValue("client", "magic_key", 0);
            IgnoreClientVersion = conf.GetValue("client", "ignore_client_version", 0);

            CashURL       = conf.GetValue("url", "cash", "http://localhost/cashshop/?v1=");
            CashChargeURL = conf.GetValue("url", "cash_charge", "http://localhost/cashshop/?v1=");
            GuildURL      = conf.GetValue("url", "guild", "http://localhost/guild/?EncVal=");

            MasterIP   = conf.GetValue("master", "ip", "localhost");
            MasterPort = conf.GetValue("master", "port", 0);
        }
예제 #4
0
        public static void Load()
        {
            var conf = new IniReader("conf/Master.ini");

            masterLog    = Convert.ToBoolean(conf.GetValue("debug", "use", 0));
            masterLogLvl = conf.GetValue("debug", "level", 0);

            masterIP   = IPAddress.Parse(conf.GetValue("listen", "ip", "127.0.0.1"));
            masterPort = conf.GetValue("listen", "port", 9001);

            loginDBType = conf.GetValue("logindb", "type", "");
            loginDB     = conf.GetValue("logindb", "name", "");
            loginDBIP   = conf.GetValue("logindb", "ip", "");
            loginDBUser = conf.GetValue("logindb", "user", "");
            loginDBPass = conf.GetValue("logindb", "password", "");

            serverDBs      = new Dictionary <int, string>();
            serverDBIPs    = new Dictionary <int, string>();
            serverDBUsers  = new Dictionary <int, string>();
            serverDBPasses = new Dictionary <int, string>();
            serverDBTypes  = new Dictionary <int, string>();
        }