First important change is for all requests sent by ASF. Across those 4 years of development I do not remember a single situation where retrying on 4xx status code brought any improvement, bad request has to be handled by us, access denied and not found won't disappear after retry, all other ones are rather unused. Therefore, it makes sense to skip remaining tries on 4xx errors and do not flood the service with requests that are very unlikely to change anything.
Second change is smaller one and it allows the consumer of WebBrowser to declare that he's interested in handling client error codes himself. This way he can add extra logic and appropriately react to them - ASF uses it in statistics module, where the listing can signal refusal to list due to e.g. outdated ASF version through 403. Previously this was treated on the same level as timeout, which wasn't optimal.
In several cases ASF sent more than 1 trade considering the same items, this happens when we have more possible matches than just one but for the same card of other side.
Since we do not preserve the state (due to various reasons), the proper thing to do is to make set exclusive not only to user, but also to a single trade offer. At worst we'll just finish remaining part of it in the next round, if by any chance our trade offer is so huge it stumbles upon 255 items limit.
* Implement basic plugin system
* The dawn of new era
* Add plugins warning
* Move more members to PublicAPI
* Open commands for the plugins
* Add IBotHackNewChat
* Run plugin events in parallel
* Use properties in IPlugin
* Hook our custom plugin into CI to ensure it compiles
* Fix dotnet brain damage
* Add IBotsComparer
* Add code documentation
* Add IBotTradeOffer
* Add IBotTradeOffer example
* Add IBotTradeOfferResults
* Final bulletproofing
* Final renaming
This will probably need a lot more tests, tweaking and bugfixing, but basic logic is:
- MatchActively added to TradingPreferences with value of 16
- User must also use SteamTradeMatcher, can't use MatchEverything
- User must have statistics enabled and be eligible for being listed (no requirement of having 100 items minimum)
Once all requirements are passed, statistics module will communicate with the listing and fetch match everything bots:
- The matching will start in 1h since ASF start and will repeat every day (right now it starts in 1 minute to aid debugging).
- Each matching is composed of up to 10 rounds maximum.
- In each round ASF will fetch our inventory and inventory of listed bots in order to find MatchableTypes items to be matched. If match is found, offer is being sent and confirmed automatically.
- Each set (composition of item type + appID it's from) can be matched in a single round only once, this is to minimize "items no longer available" as much as possible and also avoid a need to wait for each bot to react before sending all trades.
- Round ends when we try to match a total of 20 bots, or we hit no items to match in consecutive 10 tries with 10 different bots.
- If last round resulted in at least a single trade being sent, next round starts within 5 minutes since last one, otherwise matching ends and repeats the next day.
We'll see how it works in practice, expect a lot of follow-up commits, unless I won't have anything to fix or improve.
* Fix NullReferenceException in AcceptConfirmations()
* Add method to get trade token by using steamkit
* Remove AWH way to get token and caching it
* Accidentally removed some logic, fix