Improve ShutdownOnFarmingFinished #557

Previously we always skipped first shutdown event, which is appropriate but only if we actually don't have anything to farm, so owner of account can execute command and redeem keys when given bot is !started without a trouble of bot instantly turning off.
Add proper routine for stopping bot immediately if either we farmed something already, or if IdleFarmingPeriod is 0
This commit is contained in:
JustArchi
2017-05-23 05:33:39 +02:00
parent 91d6249c82
commit 5a44c8a96c

View File

@@ -501,6 +501,11 @@ namespace ArchiSteamFarm {
}
if (BotConfig.ShutdownOnFarmingFinished) {
if (farmedSomething || (Program.GlobalConfig.IdleFarmingPeriod == 0)) {
Stop();
return;
}
if (SkipFirstShutdown) {
SkipFirstShutdown = false;
} else {