diff --git a/ArchiSteamFarm/Bot.cs b/ArchiSteamFarm/Bot.cs
index c35eeb0f8..e21fff98a 100755
--- a/ArchiSteamFarm/Bot.cs
+++ b/ArchiSteamFarm/Bot.cs
@@ -2052,19 +2052,17 @@ namespace ArchiSteamFarm {
return null;
}
- if (!IsOwner(steamID)) {
+ if (!IsMaster(steamID)) {
return null;
}
if (!Program.GlobalConfig.Headless) {
- //TODO: l10n
- return "Avaliable only in headless mode!";
+ return FormatBotResponse(Strings.ErrorFunctionOnlyInHeadlessMode);
}
ASF.EUserInputType inputType;
- if (!Enum.TryParse(propertyName, out inputType) || (inputType == ASF.EUserInputType.Unknown)) {
- // TODO: Proper response
- return ResponseUnknown(steamID);
+ if (!Enum.TryParse(propertyName, true, out inputType) || (inputType == ASF.EUserInputType.Unknown)) {
+ return FormatBotResponse(string.Format(Strings.ErrorIsInvalid, nameof(inputType)));
}
SetUserInput(inputType, inputValue);
@@ -3036,6 +3034,7 @@ namespace ArchiSteamFarm {
ArchiLogger.LogNullError(nameof(inputValue) + " || " + nameof(inputValue));
}
+ // This switch should cover ONLY bot properties
switch (inputType) {
case ASF.EUserInputType.DeviceID:
DeviceID = inputValue;
@@ -3065,7 +3064,7 @@ namespace ArchiSteamFarm {
TwoFactorCode = inputValue;
break;
case ASF.EUserInputType.WCFHostname:
- // We don't handle ASF properties here
+ // We don't handle global ASF properties here
break;
default:
ASF.ArchiLogger.LogGenericWarning(string.Format(Strings.WarningUnknownValuePleaseReport, nameof(inputType), inputType));
diff --git a/ArchiSteamFarm/Localization/Strings.Designer.cs b/ArchiSteamFarm/Localization/Strings.Designer.cs
index 55ac99e2e..fd6c3ab30 100644
--- a/ArchiSteamFarm/Localization/Strings.Designer.cs
+++ b/ArchiSteamFarm/Localization/Strings.Designer.cs
@@ -774,6 +774,15 @@ namespace ArchiSteamFarm.Localization {
}
}
+ ///
+ /// Looks up a localized string similar to This function is available only in headless mode!.
+ ///
+ internal static string ErrorFunctionOnlyInHeadlessMode {
+ get {
+ return ResourceManager.GetString("ErrorFunctionOnlyInHeadlessMode", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Global config could not be loaded, please make sure that {0} exists and is valid! Follow setting up guide on the wiki if you're confused..
///
diff --git a/ArchiSteamFarm/Localization/Strings.resx b/ArchiSteamFarm/Localization/Strings.resx
index bc5df416c..5160eac05 100644
--- a/ArchiSteamFarm/Localization/Strings.resx
+++ b/ArchiSteamFarm/Localization/Strings.resx
@@ -707,4 +707,7 @@ StackTrace:
Bot is locked and can't drop any cards through idling.
+
+ This function is available only in headless mode!
+
\ No newline at end of file