mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2026-01-01 06:00:46 +00:00
Add --no-config-watch command-line argument
This commit is contained in:
@@ -130,7 +130,9 @@ namespace ArchiSteamFarm {
|
||||
|
||||
await RegisterBots().ConfigureAwait(false);
|
||||
|
||||
InitEvents();
|
||||
if (Program.ConfigWatch) {
|
||||
InitConfigWatchEvents();
|
||||
}
|
||||
}
|
||||
|
||||
internal static async Task InitGlobalConfig(GlobalConfig globalConfig) {
|
||||
@@ -404,7 +406,7 @@ namespace ArchiSteamFarm {
|
||||
Bot.Init(botsComparer);
|
||||
}
|
||||
|
||||
private static void InitEvents() {
|
||||
private static void InitConfigWatchEvents() {
|
||||
if ((FileSystemWatcher != null) || (LastWriteEvents != null)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -38,6 +38,7 @@ using SteamKit2;
|
||||
|
||||
namespace ArchiSteamFarm {
|
||||
internal static class Program {
|
||||
internal static bool ConfigWatch { get; private set; } = true;
|
||||
internal static string? NetworkGroup { get; private set; }
|
||||
internal static bool ProcessRequired { get; private set; }
|
||||
internal static bool RestartAllowed { get; private set; } = true;
|
||||
@@ -471,6 +472,10 @@ namespace ArchiSteamFarm {
|
||||
case "--network-group" when !cryptKeyNext && !networkGroupNext && !pathNext:
|
||||
networkGroupNext = true;
|
||||
|
||||
break;
|
||||
case "--no-config-watch" when !cryptKeyNext && !networkGroupNext && !pathNext:
|
||||
ConfigWatch = false;
|
||||
|
||||
break;
|
||||
case "--no-restart" when !cryptKeyNext && !networkGroupNext && !pathNext:
|
||||
RestartAllowed = false;
|
||||
|
||||
Reference in New Issue
Block a user