Exemple #1
0
        public static void Load()
        {
            old = new OldPerms();
            if (PropertiesFile.Read(Paths.ServerPropsFile, ref old, LineProcessor))
            {
                Server.SettingsUpdate();
            }

            CountdownGame.Config.Load();
            ZSGame.Config.Load();
            LSGame.Config.Load();
            CTFGame.Config.Load();
            TWGame.Config.Load();

            Database.Backend = Server.Config.UseMySQL ? MySQLBackend.Instance : SQLiteBackend.Instance;
            #pragma warning disable 0618
            Server.DefaultColor = Server.Config.DefaultColor;
            Server.moneys       = Server.Config.Currency;
            #pragma warning restore 0618

            if (!Directory.Exists(Server.Config.BackupDirectory))
            {
                Server.Config.BackupDirectory = "levels/backups";
            }

            Save();
            Server.SetMainLevel(Server.Config.MainLevel);
        }
        public static void Load()
        {
            old = new OldPerms();
            if (PropertiesFile.Read(Paths.ServerPropsFile, ref old, LineProcessor))
            {
                Server.SettingsUpdate();
            }
            if (old.saveZS)
            {
                ZSConfig.SaveSettings();
            }
            ZSConfig.LoadSettings();

            Database.Backend = ServerConfig.UseMySQL ? MySQLBackend.Instance : SQLiteBackend.Instance;
            #pragma warning disable 0618
            Server.DefaultColor = ServerConfig.DefaultColor;
            Server.moneys       = ServerConfig.Currency;
            #pragma warning restore 0618

            if (!Directory.Exists(ServerConfig.BackupDirectory))
            {
                ServerConfig.BackupDirectory = Path.Combine(Utils.FolderPath, "levels/backups");
            }
            Save();
        }
Exemple #3
0
        public static void Load()
        {
            old = new OldPerms();
            if (PropertiesFile.Read(Paths.ServerPropsFile, ref old, LineProcessor))
            {
                Server.SettingsUpdate();
            }

            CountdownGame.Config.Load();
            ZSGame.Config.Load();
            LSGame.Config.Load();
            CTFGame.Config.Load();
            TWGame.Config.Load();

            Database.Backend = Server.Config.UseMySQL ? MySQLBackend.Instance : SQLiteBackend.Instance;

            if (!Directory.Exists(Server.Config.BackupDirectory))
            {
                Server.Config.BackupDirectory = "levels/backups";
            }

            Save();
            Server.SetMainLevel(Server.Config.MainLevel);
        }