* Fix wallet code redeeming
* Fix creating wallet
* More fixes
* More fixes
* Renaming variables
* More renaming thanks to valve
* Returning actual EPRD value instead of assumed
* Additional wallet check
* Steam gives Success code even on bad key
weird response but ok
* fix fucked up logic
* Fix steam fuckup by giving user a real response, not that one which is in steam imagination
* Remove amount property
* Fix logic fuckup + add some comments
* Update BGR logic for handling wallet keys
* Fix build
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
In ASF V3.0 and before, we had a very naive mechanism with session handling that used to work fine but send a lot of requests as we always had to check session before sending a request.
Since ASF V3.1 until now we used new mechanism which refreshed session only when it indeed got invalidated, which worked good until now, but apparently due to some changed at Valve it stopped redirecting appropriately in all POST requests and non-/my GET/HEAD ones.
Therefore, implement hybrid session logic whick works V3.1+ for /my requests, and V3.0- for everything else.
* Add accepting of wallet gift cards
* Split function by two, move bot-related parts to Bot.cs, better xpath
* Remove unneccessary warning
* Forgot to remove beginning chars
* Request data to separate variable, session request in GetDigital..., variable renaming
* Modify XPath a bit to make it more understandable
* Move substring call further, length checking
* Implement semaphore and queue
* Fix typo
* SessionID comment, entries are in alphabetical order
* Add a few spaces to xpath
* Logging: warning -> error
* Dispose GiftCardsSemaphore
* General formatting fixes
* Final formatting fixes, HandledGifts check
* AcceptGifts config value handling
* Handling 0 in function argument
@vital7
Steam.cs:
- Add missing constructor for json deserialization
- Change name into UserPrivacy since we use it for both request and response, no longer response only
- Move ECommentPermission one level above, it's not internal member of PrivacySettings
- Make UserPrivacy constructor accept PrivacySettings, since PrivacySettings is internal and not private.
- Make ECommentPermission underlying type of byte
ArchiWebHandler.cs:
- Put function in proper place alphabetically
- Cast CommentPermission to new underlying type of byte
- Remove mapping, AWH should not be in charge of correcting a caller, unless that caller can't be corrected earlier (e.g. direct Steam response). Since Bot is in charge of calling AWH, Bot should do the correction, not AWH.
Bot.cs:
- Change command to !privacy bot n,n,n,n,n,n, this makes it possible for mixing it with enum members (such as !privacy bot public,private,friendsonly,public,public), which would be preferred way of execution instead of cryptic numbers.
- Make appropriate mapping between general and comments, since userspace is in charge of that.
- Add comments and correct creating UserPrivacy object.
- Make the default option private and let user skip extra options if he wants to edit e.g. only profile to public.
Apart from that, general error handling and a lot of other misc fixed, including renaming NonZeroResponse to NumberResponse, which makes more sense.