Found more use cases

This commit is contained in:
Bruno Logerfo
2017-03-14 08:41:33 -03:00
parent f8b2fcda7a
commit 8f417f85e9
4 changed files with 7 additions and 14 deletions

View File

@@ -281,15 +281,13 @@ namespace ArchiSteamFarm {
return;
}
Bot bot;
if (!Bot.Bots.TryGetValue(botName, out bot)) {
if (!Bot.Bots.TryGetValue(botName, out Bot bot)) {
return;
}
DateTime lastWriteTime = File.GetLastWriteTime(e.FullPath);
DateTime savedLastWriteTime;
if (LastWriteTimes.TryGetValue(bot, out savedLastWriteTime)) {
if (LastWriteTimes.TryGetValue(bot, out DateTime savedLastWriteTime)) {
if (savedLastWriteTime >= lastWriteTime) {
return;
}
@@ -347,8 +345,7 @@ namespace ArchiSteamFarm {
return;
}
Bot bot;
if (Bot.Bots.TryGetValue(botName, out bot)) {
if (Bot.Bots.TryGetValue(botName, out Bot bot)) {
bot.OnNewConfigLoaded(new BotConfigEventArgs()).Forget();
}
}
@@ -370,8 +367,7 @@ namespace ArchiSteamFarm {
return;
}
Bot bot;
if (Bot.Bots.TryGetValue(oldBotName, out bot)) {
if (Bot.Bots.TryGetValue(oldBotName, out Bot bot)) {
bot.OnNewConfigLoaded(new BotConfigEventArgs()).Forget();
}