mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2026-01-01 06:00:46 +00:00
Code cleanup
This commit is contained in:
@@ -2046,48 +2046,6 @@ namespace ArchiSteamFarm {
|
||||
return null;
|
||||
}
|
||||
|
||||
private void SetUserInput(ASF.EUserInputType inputType, string inputValue) {
|
||||
if ((inputType == ASF.EUserInputType.Unknown) || string.IsNullOrEmpty(inputValue)) {
|
||||
ArchiLogger.LogNullError(nameof(inputValue) + " || " + nameof(inputValue));
|
||||
}
|
||||
|
||||
switch (inputType) {
|
||||
case ASF.EUserInputType.DeviceID:
|
||||
DeviceID = inputValue;
|
||||
break;
|
||||
case ASF.EUserInputType.Login:
|
||||
if (BotConfig != null) {
|
||||
BotConfig.SteamLogin = inputValue;
|
||||
}
|
||||
|
||||
break;
|
||||
case ASF.EUserInputType.Password:
|
||||
if (BotConfig != null) {
|
||||
BotConfig.SteamPassword = inputValue;
|
||||
}
|
||||
|
||||
break;
|
||||
case ASF.EUserInputType.SteamGuard:
|
||||
AuthCode = inputValue;
|
||||
break;
|
||||
case ASF.EUserInputType.SteamParentalPIN:
|
||||
if (BotConfig != null) {
|
||||
BotConfig.SteamParentalPIN = inputValue;
|
||||
}
|
||||
|
||||
break;
|
||||
case ASF.EUserInputType.TwoFactorAuthentication:
|
||||
TwoFactorCode = inputValue;
|
||||
break;
|
||||
case ASF.EUserInputType.WCFHostname:
|
||||
// We don't handle ASF properties here
|
||||
break;
|
||||
default:
|
||||
ASF.ArchiLogger.LogGenericWarning(string.Format(Strings.WarningUnknownValuePleaseReport, nameof(inputType), inputType));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private string ResponseInput(ulong steamID, string propertyName, string inputValue) {
|
||||
if ((steamID == 0) || string.IsNullOrEmpty(propertyName) || string.IsNullOrEmpty(inputValue)) {
|
||||
ASF.ArchiLogger.LogNullError(nameof(steamID) + " || " + nameof(propertyName) + " || " + nameof(inputValue));
|
||||
@@ -3073,6 +3031,48 @@ namespace ArchiSteamFarm {
|
||||
}
|
||||
}
|
||||
|
||||
private void SetUserInput(ASF.EUserInputType inputType, string inputValue) {
|
||||
if ((inputType == ASF.EUserInputType.Unknown) || string.IsNullOrEmpty(inputValue)) {
|
||||
ArchiLogger.LogNullError(nameof(inputValue) + " || " + nameof(inputValue));
|
||||
}
|
||||
|
||||
switch (inputType) {
|
||||
case ASF.EUserInputType.DeviceID:
|
||||
DeviceID = inputValue;
|
||||
break;
|
||||
case ASF.EUserInputType.Login:
|
||||
if (BotConfig != null) {
|
||||
BotConfig.SteamLogin = inputValue;
|
||||
}
|
||||
|
||||
break;
|
||||
case ASF.EUserInputType.Password:
|
||||
if (BotConfig != null) {
|
||||
BotConfig.SteamPassword = inputValue;
|
||||
}
|
||||
|
||||
break;
|
||||
case ASF.EUserInputType.SteamGuard:
|
||||
AuthCode = inputValue;
|
||||
break;
|
||||
case ASF.EUserInputType.SteamParentalPIN:
|
||||
if (BotConfig != null) {
|
||||
BotConfig.SteamParentalPIN = inputValue;
|
||||
}
|
||||
|
||||
break;
|
||||
case ASF.EUserInputType.TwoFactorAuthentication:
|
||||
TwoFactorCode = inputValue;
|
||||
break;
|
||||
case ASF.EUserInputType.WCFHostname:
|
||||
// We don't handle ASF properties here
|
||||
break;
|
||||
default:
|
||||
ASF.ArchiLogger.LogGenericWarning(string.Format(Strings.WarningUnknownValuePleaseReport, nameof(inputType), inputType));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private async Task Start() {
|
||||
if (!KeepRunning) {
|
||||
KeepRunning = true;
|
||||
|
||||
Reference in New Issue
Block a user