Add missing returns, closes #394

This commit is contained in:
JustArchi
2017-01-03 17:46:28 +01:00
parent 655b47ead9
commit c293ad6809

View File

@@ -1541,6 +1541,10 @@ namespace ArchiSteamFarm {
return null;
}
if (!IsConnectedAndLoggedOn) {
return "This bot instance is not connected!";
}
if (BotDatabase.MobileAuthenticator == null) {
return "That bot doesn't have ASF 2FA enabled! Did you forget to import your authenticator as ASF 2FA?";
}
@@ -1726,14 +1730,14 @@ namespace ArchiSteamFarm {
return null;
}
if (!LootingAllowed) {
return "Looting is temporarily disabled!";
}
if (!IsConnectedAndLoggedOn) {
return "This bot instance is not connected!";
}
if (!LootingAllowed) {
return "Looting is temporarily disabled!";
}
if (BotConfig.SteamMasterID == 0) {
return "Trade couldn't be send because SteamMasterID is not defined!";
}
@@ -2071,6 +2075,10 @@ namespace ArchiSteamFarm {
return null;
}
if (!IsConnectedAndLoggedOn) {
return "This bot instance is not connected!";
}
bool forward = !redeemFlags.HasFlag(ERedeemFlags.SkipForwarding) && (redeemFlags.HasFlag(ERedeemFlags.ForceForwarding) || BotConfig.RedeemingPreferences.HasFlag(BotConfig.ERedeemingPreferences.Forwarding));
bool distribute = !redeemFlags.HasFlag(ERedeemFlags.SkipDistribution) && (redeemFlags.HasFlag(ERedeemFlags.ForceDistribution) || BotConfig.RedeemingPreferences.HasFlag(BotConfig.ERedeemingPreferences.Distributing));
message = message.Replace(",", Environment.NewLine);