Add !update

This commit is contained in:
JustArchi
2016-03-11 19:48:14 +01:00
parent 3afa202d0b
commit 187f0800b2
2 changed files with 10 additions and 7 deletions

View File

@@ -334,6 +334,8 @@ namespace ArchiSteamFarm {
return null;
case "!farm":
return await ResponseFarm().ConfigureAwait(false);
case "!loot":
return await ResponseSendTrade().ConfigureAwait(false);
case "!rejoinchat":
return ResponseRejoinChat();
case "!restart":
@@ -345,8 +347,9 @@ namespace ArchiSteamFarm {
return ResponseStatusAll();
case "!stop":
return ResponseStop();
case "!loot":
return await ResponseSendTrade().ConfigureAwait(false);
case "!update":
await Program.CheckForUpdate().ConfigureAwait(false);
return "Done!";
default:
return "Unrecognized command: " + message;
}
@@ -367,6 +370,8 @@ namespace ArchiSteamFarm {
}
case "!farm":
return await ResponseFarm(args[1]).ConfigureAwait(false);
case "!loot":
return await ResponseSendTrade(args[1]).ConfigureAwait(false);
case "!play":
if (args.Length > 2) {
return await ResponsePlay(args[1], args[2]).ConfigureAwait(false);
@@ -381,12 +386,10 @@ namespace ArchiSteamFarm {
}
case "!start":
return await ResponseStart(args[1]).ConfigureAwait(false);
case "!stop":
return ResponseStop(args[1]);
case "!status":
return ResponseStatus(args[1]);
case "!loot":
return await ResponseSendTrade(args[1]).ConfigureAwait(false);
case "!stop":
return ResponseStop(args[1]);
default:
return "Unrecognized command: " + args[0];
}

View File

@@ -78,7 +78,7 @@ namespace ArchiSteamFarm {
private static Timer AutoUpdatesTimer;
private static EMode Mode = EMode.Normal;
private static async Task CheckForUpdate() {
internal static async Task CheckForUpdate() {
string oldExeFile = ExecutableFile + ".old";
// We booted successfully so we can now remove old exe file