Commit Graph

53 Commits

Author SHA1 Message Date
JustArchi
01482e8dd0 Misc 2020-05-21 22:47:23 +02:00
JustArchi
6c22724835 Implement OS-wide, cross-process semaphores for ASF instances
Distinction is preserved on webproxy basis (even for LoginLimiter which shouldn't work like that)

Addresses crucial part of #1798
2020-05-20 22:01:29 +02:00
JustArchi
b23f634c9b Implement IAsyncDisposable for all ASF classes that can make use of it 2020-04-18 17:52:11 +02:00
JustArchi
5360cba93a Remove deprecated features 2020-04-06 17:33:31 +02:00
JustArchi
847c78b650 R# cleanup 2020-03-05 21:05:40 +01:00
Vitaliy
6657945b7d Use IAsyncEnumerable for getting inventory (#1652)
* Use IAsyncEnumerable for getting inventory

* Don't suppress exceptions, catch them in ResponseUnpackBoosters

* Make sure we don't get duplicate assets during unpack

* Rewrite inventory filters to LINQ methods

* Add handling duplicate items, mark GetInventory as obsolete, catch exceptions from getting inventory errors

* Mark GetInventoryEnumerable as NotNull, don't check received inventory for null, use comparison with nullable values

* Use specific types of exceptions, log exceptions using LogGenericWarningException, handle IOException separately (without logging the exception), remove default null value

* Use old method signature for obsolete API

* Use error level for generic exceptions

* Fix wantedSets not being used

* Correct exception types, rename function

* Replace exception types

* Make SendTradeOfferAsync that accepts Func<Steam.Asset, bool> as a filter

* Fix missing targetSteamID in ResponseTransferByRealAppIDs

* Make parameter name readable

* Rename method
2020-02-22 18:03:22 +01:00
JustArchi
0370168b02 Happy new year 2020-02-01 23:33:35 +01:00
JustArchi
f0292a07b9 Misc 2020-01-01 12:45:32 +01:00
JustArchi
fc564d766c Add loot% command 2019-12-26 18:57:02 +01:00
JustArchi
a0dfb28e59 R# cleanup 2019-10-13 17:21:40 +02:00
Łukasz Domeradzki
5b4867c387 Update ASF to .NET Core 3.0 (#1427)
* Initial bump to .net core 3.0

* Update cc.sh

* Update appveyor.yml

* Update ArchiSteamFarm.csproj

* Update appveyor.yml

* Update .travis.yml

* Build corrections

* Cleanup

* Update .travis.yml

* Don't publish trimmed for now

* Update ArchiSteamFarm.csproj
2019-09-26 20:28:25 +02:00
JustArchi
ca2109d3d7 Open TradingLock and API key check for public 2019-08-16 16:37:55 +02:00
JustArchi
22c1b6130a Closes #1290 2019-06-23 17:30:34 +02:00
JustArchi
285449b3ea State count of handled confirmations in 2fa commands 2019-04-08 21:15:09 +02:00
JustArchi
947c9e9f23 Bot-related improvements 2019-04-03 18:57:25 +02:00
JustArchi
6241e283b5 Increase contextID to 64 bits 2019-02-22 04:42:36 +01:00
JustArchi
b677ba8202 Code/style cleanup 2019-02-16 17:34:17 +01:00
JustArchi
dd621a90e4 Misc 2019-02-04 03:19:00 +01:00
JustArchi
53ecd8d8e6 Misc 2019-01-31 02:31:01 +01:00
JustArchi
47b2aa137f Move token fetching further below 2019-01-26 22:11:35 +01:00
JustArchi
546cc55ab9 Misc 2019-01-26 22:07:00 +01:00
JustArchi
e86bf695c8 Closes #1060 2019-01-26 22:05:31 +01:00
JustArchi
c594da5acb Add 2FA actions to ASF API 2019-01-23 17:58:37 +01:00
JustArchi
08b1d4190d Expose version in update API 2019-01-18 17:07:00 +01:00
JustArchi
18d5f1938f Open configs for public API 2019-01-14 21:50:23 +01:00
JustArchi
e1e9a9f457 Rider cleanup 2019-01-14 19:11:17 +01:00
JustArchi
b28e45fb87 Misc 2019-01-12 19:13:29 +01:00
JustArchi
e448284174 Misc 2019-01-12 19:08:36 +01:00
JustArchi
e5fff9309f Misc items-related improvements 2019-01-11 01:51:38 +01:00
JustArchi
192656cd02 Implement basic code contracts 2019-01-10 23:44:32 +01:00
Łukasz Domeradzki
0f2a816b92 Implement plugin system (#1020)
* 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
2019-01-10 22:33:07 +01:00
JustArchi
3bbddcf723 Happy new year 🎉 2019-01-02 16:32:53 +01:00
JustArchi
7d59062217 Misc 2018-12-29 19:01:56 +01:00
Vital7
90303ece36 Fix ContextID type (#990)
* Fix NullReferenceException in AcceptConfirmations()

* Change ContextID type from byte to uint

* Change const types
2018-12-29 14:35:58 +01:00
JustArchi
f8aa8babcf R# cleanup 2018-12-15 00:27:15 +01:00
JustArchi
ec72962992 Use more correct equality code 2018-12-12 21:25:39 +01:00
JustArchi
3f8089143b Do not fail the routine if it takes us more than 1 time 2018-12-12 21:23:34 +01:00
JustArchi
4c0dc570fe Improve confirmations code 2018-12-12 21:17:12 +01:00
JustArchi
bb6276835f Code review, bugfixing, remove loot& command 2018-12-04 02:05:09 +01:00
JustArchi
1beb08f823 Implement ETradingPreferences.MatchActively
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.
2018-11-29 18:35:58 +01:00
JustArchi
0db344ff32 Misc 2018-11-08 05:23:49 +01:00
Vital7
23b665d4ea Fix NullReferenceException in AcceptConfirmations() (#941) 2018-11-08 04:57:59 +01:00
JustArchi
fed8c8a705 Handle partial confirmations in a retry 2018-10-13 02:18:19 +02:00
JustArchi
353e7e7b88 Confirmations logic improvements 2018-10-13 00:17:45 +02:00
JustArchi
d46c3a66b7 Improve confirmations speed 2018-10-12 16:54:21 +02:00
JustArchi
f6f93e6276 R# misc 2018-09-30 22:03:45 +02:00
Abrynos
e188a1d751 Implement command TRANSFER@ for the sake of completeness (#911)
* Implement command TRANSFER@ for the sake of completeness

* Fix formatting

* Make targetSteamID in SendTradeOffer mandatory and fix logic in new commands


in the previous build the new commands would act like a loot and send trades to the first master instead of the targetted bot

* Improve performance


Strings will only be parsed into uint/byte once if needed for several bots and the targetBot will only be searched for once in Bot.Bots

* Improve performance

* Make SendTradeOffer a generic action responsible for sending a trade and call it with different arguments from different loot/transfer commands

* Move check to appropriate place

* Shuffle arguments around

* Fix compilation errors

* I'm lazy and dumb... but mostly dumb
2018-09-29 22:20:35 +02:00
JustArchi
a53bf0fd3d Expose cached SteamID to IPC 2018-09-23 02:17:17 +02:00
JustArchi
b247ba6167 Add Pause/Resume API actions 2018-09-19 21:11:58 +02:00
JustArchi
5abace39f9 Add new Bot actions + a lot of performance improvements 2018-09-19 18:25:17 +02:00