예제 #1
0
        public static void LoadAllSettings()
        {
            // Unload custom plugins
            List <Plugin> plugins = new List <Plugin>(Plugin.all);

            foreach (Plugin p in plugins)
            {
                if (Plugin.core.Contains(p))
                {
                    continue;
                }
                Plugin.Unload(p, false);
            }

            ZSGame.Instance.infectMessages = ZSConfig.LoadInfectMessages();
            Colors.Load();
            Alias.Load();
            BlockDefinition.LoadGlobal();
            ImagePalette.Load();

            SrvProperties.Load();
            AuthService.ReloadDefault();
            Group.LoadAll();
            CommandPerms.Load();
            Command.InitAll();
            Block.SetBlocks();
            AwardsList.Load();
            PlayerAwards.Load();
            Economy.Load();
            WarpList.Global.Filename = "extra/warps.save";
            WarpList.Global.Load();
            CommandExtraPerms.Load();
            ProfanityFilter.Init();
            Team.LoadList();
            ChatTokens.LoadCustom();
            SrvProperties.FixupOldPerms();
            CpeExtension.LoadDisabledList();

            TextFile announcementsFile = TextFile.Files["Announcements"];

            announcementsFile.EnsureExists();
            announcements = announcementsFile.GetText();

            // Reload custom plugins
            foreach (Plugin p in plugins)
            {
                if (Plugin.core.Contains(p))
                {
                    continue;
                }
                Plugin.Load(p, false);
            }

            OnConfigUpdatedEvent.Call();
        }
예제 #2
0
        public static void Start()
        {
            serverConfig = ConfigElement.GetAll(typeof(ServerConfig));
            levelConfig  = ConfigElement.GetAll(typeof(LevelConfig));
            zoneConfig   = ConfigElement.GetAll(typeof(ZoneConfig));

            #pragma warning disable 0618
            Player.players = PlayerInfo.Online.list;
            Server.levels  = LevelInfo.Loaded.list;
            #pragma warning restore 0618

            StartTime    = DateTime.UtcNow;
            shuttingDown = false;
            Logger.Log(LogType.SystemActivity, "Starting Server");
            ServicePointManager.Expect100Continue = false;

            CheckFile("MySql.Data.dll");
            CheckFile("sqlite3_x32.dll");
            CheckFile("sqlite3_x64.dll");
            CheckFile("LibNoise.dll");

            EnsureFilesExist();
            MoveSqliteDll();
            MoveOutdatedFiles();

            LoadAllSettings();
            SrvProperties.GenerateSalt();

            InitDatabase();
            Economy.LoadDatabase();

            Background.QueueOnce(UpgradeTasks.CombineEnvFiles);
            Background.QueueOnce(LoadMainLevel);
            Plugin.LoadAll();
            Background.QueueOnce(LoadAutoloadMaps);
            Background.QueueOnce(UpgradeTasks.MovePreviousLevelFiles);
            Background.QueueOnce(UpgradeTasks.UpgradeOldTempranks);
            Background.QueueOnce(UpgradeTasks.UpgradeDBTimeSpent);
            Background.QueueOnce(InitPlayerLists);
            Background.QueueOnce(UpgradeTasks.UpgradeBots);

            Background.QueueOnce(SetupSocket);
            Background.QueueOnce(InitTimers);
            Background.QueueOnce(InitRest);
            Background.QueueOnce(InitHeartbeat);

            Devs.Clear();
            Mods.Clear();
            Background.QueueOnce(InitTasks.UpdateStaffList);

            ServerTasks.QueueTasks();
            Background.QueueRepeat(ThreadSafeCache.DBCache.CleanupTask,
                                   null, TimeSpan.FromMinutes(5));
        }
예제 #3
0
        public static void LoadAllSettings()
        {
            // Unload custom plugins
            List <Plugin> plugins = Plugin.all;

            foreach (Plugin plugin in plugins)
            {
                if (Plugin.core.Contains(plugin))
                {
                    continue;
                }
                plugin.Unload(false);
            }

            zombie.LoadInfectMessages();
            Colors.LoadList();
            Alias.Load();
            BlockDefinition.LoadGlobal();
            ImagePalette.Load();

            SrvProperties.Load();
            Group.InitAll();
            Command.InitAll();
            CommandPerms.Load();
            Block.SetBlocks();
            BlockDefinition.UpdateGlobalBlockProps();
            Awards.Load();
            Economy.Load();
            WarpList.Global.Filename = "extra/warps.save";
            WarpList.Global.Load();
            CommandExtraPerms.Load();
            ProfanityFilter.Init();
            Team.LoadList();
            ChatTokens.LoadCustom();
            SrvProperties.FixupOldPerms();

            // Reload custom plugins
            foreach (Plugin plugin in plugins)
            {
                if (Plugin.core.Contains(plugin))
                {
                    continue;
                }
                plugin.Load(false);
            }
        }
예제 #4
0
 public static void LoadAllSettings()
 {
     Colors.LoadExtColors();
     Alias.Load();
     BlockDefinition.LoadGlobal();
     SrvProperties.Load("properties/server.properties");
     Updater.Load("properties/update.properties");
     Group.InitAll();
     Command.InitAll();
     GrpCommands.fillRanks();
     Block.SetBlocks();
     Awards.Load();
     Economy.Load();
     Warp.LOAD();
     CommandOtherPerms.Load();
     ProfanityFilter.Init();
     Team.LoadList();
 }
예제 #5
0
        public static void LoadAllSettings()
        {
            zombie.LoadInfectMessages();
            Colors.LoadExtColors();
            Alias.Load();
            Bots.BotsFile.Load();
            BlockDefinition.LoadGlobal();

            SrvProperties.Load("properties/server.properties");
            Updater.Load("properties/update.properties");
            Group.InitAll();
            Command.InitAll();
            GrpCommands.fillRanks();
            Block.SetBlocks();
            Awards.Load();
            Economy.Load();
            WarpList.Global.Load(null);
            CommandOtherPerms.Load();
            ProfanityFilter.Init();
            Team.LoadList();
            ChatTokens.LoadCustom();
            FixupOldPerms();
        }