Implement and use persistent ServerList

Initial idea was suggested back in #66, but recently made possible in clean and nice way, thanks to @azuisleet and @Netshroud
This commit is contained in:
JustArchi
2016-07-08 09:02:53 +02:00
parent ce4733547c
commit 7e9844edab
7 changed files with 203 additions and 25 deletions

View File

@@ -462,7 +462,6 @@ namespace ArchiSteamFarm {
Logging.LogGenericInfo("ASF V" + Version);
Directory.SetCurrentDirectory(ExecutableDirectory);
InitServices();
// Allow loading configs from source tree if it's a debug build
if (Debugging.IsDebugBuild) {
@@ -481,6 +480,8 @@ namespace ArchiSteamFarm {
}
}
InitServices();
// If debugging is on, we prepare debug directory prior to running
if (GlobalConfig.Debug) {
if (Directory.Exists(DebugDirectory)) {
@@ -515,7 +516,7 @@ namespace ArchiSteamFarm {
CheckForUpdate().Wait();
// Before attempting to connect, initialize our list of CMs
Bot.RefreshCMs(GlobalDatabase.CellID).Wait();
Bot.InitializeCMs(GlobalDatabase.CellID, GlobalDatabase.ServerListProvider);
bool isRunning = false;