Move Statistics to global config

This commit is contained in:
JustArchi
2016-03-09 05:02:07 +01:00
parent 1403ffe190
commit c632c025cb
5 changed files with 6 additions and 8 deletions

View File

@@ -1218,7 +1218,7 @@ namespace ArchiSteamFarm {
JoinMasterChat();
}
if (BotConfig.Statistics) {
if (Program.GlobalConfig.Statistics) {
await ArchiWebHandler.JoinClan(ArchiSCFarmGroup).ConfigureAwait(false);
SteamFriends.JoinChat(ArchiSCFarmGroup);
}

View File

@@ -93,9 +93,6 @@ namespace ArchiSteamFarm {
[JsonProperty(Required = Required.DisallowNull)]
internal HashSet<uint> GamesPlayedWhileIdle { get; private set; } = new HashSet<uint>() { 0 };
[JsonProperty(Required = Required.DisallowNull)]
internal bool Statistics { get; private set; } = true;
internal static BotConfig Load(string path) {
if (!File.Exists(path)) {
@@ -200,8 +197,6 @@ namespace ArchiSteamFarm {
}
break;
case "Statistics":
botConfig.Statistics = bool.Parse(value);
break;
case "Blacklist":
case "SteamNickname":
break;

View File

@@ -62,6 +62,9 @@ namespace ArchiSteamFarm {
[JsonProperty(Required = Required.DisallowNull)]
internal ushort WCFPort { get; private set; } = 1242;
[JsonProperty(Required = Required.DisallowNull)]
internal bool Statistics { get; private set; } = true;
[JsonProperty(Required = Required.DisallowNull)]
internal HashSet<uint> Blacklist { get; private set; } = new HashSet<uint>(GlobalBlacklist);

View File

@@ -7,6 +7,7 @@
"RequestLimiterDelay": 7,
"WCFHostname": "localhost",
"WCFPort": 1242,
"Statistics": true,
"Blacklist": [
267420,
303700,

View File

@@ -21,6 +21,5 @@
"CustomGamePlayedWhileIdle": null,
"GamesPlayedWhileIdle": [
0
],
"Statistics": true
]
}