mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2026-01-01 14:10:53 +00:00
Add missing program shutdown
This commit is contained in:
@@ -449,6 +449,8 @@ namespace ArchiSteamFarm {
|
||||
if (SteamClient.IsConnected) {
|
||||
Disconnect();
|
||||
}
|
||||
|
||||
Events.OnBotShutdown();
|
||||
}
|
||||
|
||||
internal async Task LootIfNeeded() {
|
||||
|
||||
@@ -1,8 +1,18 @@
|
||||
using SteamKit2;
|
||||
using System.Linq;
|
||||
using SteamKit2;
|
||||
|
||||
namespace ArchiSteamFarm {
|
||||
internal static class Events {
|
||||
internal static void OnStateUpdated(Bot bot, SteamFriends.PersonaStateCallback callback) {
|
||||
}
|
||||
|
||||
internal static void OnBotShutdown() {
|
||||
if (Bot.Bots.Values.Any(bot => bot.KeepRunning)) {
|
||||
return;
|
||||
}
|
||||
|
||||
Logging.LogGenericInfo("No bots are running, exiting");
|
||||
Program.Exit();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user