mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2026-01-01 14:10:53 +00:00
Add !version
This commit is contained in:
@@ -375,6 +375,8 @@ namespace ArchiSteamFarm {
|
||||
return ResponseStop(steamID);
|
||||
case "!update":
|
||||
return await ResponseUpdate(steamID).ConfigureAwait(false);
|
||||
case "!version":
|
||||
return ResponseVersion(steamID);
|
||||
default:
|
||||
return ResponseUnknown(steamID);
|
||||
}
|
||||
@@ -1305,6 +1307,19 @@ namespace ArchiSteamFarm {
|
||||
return "Done!";
|
||||
}
|
||||
|
||||
private string ResponseVersion(ulong steamID) {
|
||||
if (steamID == 0) {
|
||||
Logging.LogNullError(nameof(steamID));
|
||||
return null;
|
||||
}
|
||||
|
||||
if (!IsMaster(steamID)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return "ASF V" + Program.Version;
|
||||
}
|
||||
|
||||
private void HandleCallbacks() {
|
||||
TimeSpan timeSpan = TimeSpan.FromMilliseconds(CallbackSleep);
|
||||
while (KeepRunning || SteamClient.IsConnected) {
|
||||
|
||||
@@ -433,7 +433,7 @@ namespace ArchiSteamFarm {
|
||||
AppDomain.CurrentDomain.UnhandledException += UnhandledExceptionHandler;
|
||||
TaskScheduler.UnobservedTaskException += UnobservedTaskExceptionHandler;
|
||||
|
||||
Logging.LogGenericInfo("Archi's Steam Farm, version " + Version);
|
||||
Logging.LogGenericInfo("ASF V" + Version);
|
||||
Directory.SetCurrentDirectory(ExecutableDirectory);
|
||||
InitServices();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user