This commit is contained in:
JustArchi
2016-04-25 11:10:39 +02:00
parent 351d45e049
commit 415ee8cc57
3 changed files with 10 additions and 2 deletions

View File

@@ -610,6 +610,8 @@ namespace ArchiSteamFarm {
// Remove from our pending inventory all items that are not steam cards and boosters
inventory.RemoveWhere(item => item.Type != Steam.Item.EType.TradingCard && item.Type != Steam.Item.EType.FoilTradingCard && item.Type != Steam.Item.EType.BoosterPack);
inventory.TrimExcess();
if (inventory.Count == 0) {
return "Nothing to send, inventory seems empty!";
}

View File

@@ -173,6 +173,7 @@ namespace ArchiSteamFarm {
// Now remove from our inventory all items we're NOT interested in
inventory.RemoveWhere(item => !appIDs.Contains(item.RealAppID));
inventory.TrimExcess();
// If for some reason Valve is talking crap and we can't find mentioned items, assume OK
if (inventory.Count == 0) {

View File

@@ -122,8 +122,13 @@ namespace ArchiSteamFarm {
Logging.LogGenericInfo("Received command: " + input);
string command = '!' + input;
string output = bot.Response(Program.GlobalConfig.SteamOwnerID, command).Result; // TODO: This should be asynchronous
string output;
if (Program.GlobalConfig.SteamOwnerID == 0) {
output = "Refusing to handle request because SteamOwnerID is not set!";
} else {
string command = '!' + input;
output = bot.Response(Program.GlobalConfig.SteamOwnerID, command).Result; // TODO: This should be asynchronous
}
Logging.LogGenericInfo("Answered to command: " + input + " with: " + output);
return output;