Commit Graph

64 Commits

Author SHA1 Message Date
JustArchi
2a5a60e094 Slightly improve confirmations limiter, #769
We don't need strict 1-request-at-a-time logic, just delay between consecutive ones. This doesn't change the logic dramatically, only starts counting delay the moment we send the request and not the moment we receive the response.
2018-03-21 17:42:44 +01:00
JustArchi
3682eefc02 Code review 2018-03-09 15:43:25 +01:00
JustArchi
4ba026a91f Make confirmation's type detection more robust 2018-03-07 17:03:39 +01:00
JustArchi
2744577019 Fix for another Steam breaking change 2018-03-07 00:34:51 +01:00
JustArchi
c18964ceef Greatly improve ASF background operations
I hated that Forget() for quite a long time now, finally this code looks much better now.
2018-02-26 18:48:57 +01:00
JustArchi
2a71032ffa Misc 2018-02-07 09:25:23 +01:00
JustArchi
69e3885a96 Code review 2018-02-07 09:13:58 +01:00
JustArchi
c6f812d0e7 Fix for latest Steam breaking fix
I wonder if Valve does anything when this one overflows too.
2018-02-04 06:35:54 +01:00
JustArchi
4c330ded16 Closes #728 2018-01-12 19:43:34 +01:00
JustArchi
6bbff6ab4e Happy new year 2018-01-01 02:56:53 +01:00
JustArchi
319fe69088 Don't keep SteamTimeDifference infinitely
With long-running systems time might run out of sync eventually.
2017-12-17 11:31:42 +01:00
JustArchi
f21a998bbb Test for double fine adventure 2017-12-15 10:37:51 +01:00
JustArchi
339eb8df0d Rename 2/2 2017-12-14 08:23:17 +01:00
JustArchi
d5f44f8f6c ReSharper: update header 2017-11-18 17:27:06 +01:00
JustArchi
8019cdcbb4 Code review according to Jeffrey Richter
> The pattern is to take the basest class or interface possible for your arguments and return the most specific class or interface possible for your return types. This gives your callers the most flexibility in passing in types to your methods and the most opportunities to cast/reuse the return values.
2017-11-16 22:10:11 +01:00
JustArchi
10ffd242cd ReSharper ignored warnings review 2017-09-21 03:16:42 +02:00
JustArchi
f24be67c8c Bunch of stuff for #605 2017-08-01 12:41:57 +02:00
JustArchi
2db65d324a Closes #545 2017-07-23 02:11:16 +02:00
JustArchi
9aa36f1a03 Code style update/fixes 2017-07-03 12:14:23 +02:00
JustArchi
0ecf6da44e Initial .NET Core 2.0 port 2017-06-26 03:36:51 +02:00
JustArchi
fcf9686a79 Revert "Resharper cleanup"
This reverts commit 7c8d7b5ada.

Bad cleanup.
2017-04-05 17:01:18 +02:00
JustArchi
7c8d7b5ada Resharper cleanup 2017-04-05 16:59:48 +02:00
Bruno Logerfo
f8b2fcda7a C# 7.0 syntax sugars 2017-03-14 08:20:29 -03:00
JustArchi
024931027f Misc + missing type 2017-03-13 01:49:40 +01:00
JustArchi
9b2380fdf9 Run API calls in their own tasks
Those SK2 calls are synchronous after all, and they might affect responsiveness negatively when a single bot is executing many of them.
This is once again not a problem of ASF, as here we can have like 1-2 concurrent API calls, but ArchiBoT suffered from this a lot.
2017-03-12 07:40:22 +01:00
JustArchi
56983c0470 Handle system clock updates
In very rare scenario of starting from time X, calculating SteamTimeDifference of Y, then changing time from X to Z, old Y difference might no longer be accurate, which could lead to temporary failure of generating tokens/confirmations for given time.
Steam accepts tokens for quite a while (15 minutes from their time IIRC), so this would only hit us if we started from really huge time gap X, and not just normal typical small max 1-2 minutes updates.
2017-02-13 20:53:06 +01:00
JustArchi
4b4f2626a8 Fix ASF crash on invalid IdentitySecret/SharedSecret 2017-02-09 13:23:54 +01:00
JustArchi
f3b53d3da2 Implement ArchiBoT way of skipping unreleased games for farming purpose, closes #425 2017-01-17 17:59:40 +01:00
JustArchi
dd8c1a79e4 Localizing... 2017-01-06 16:29:34 +01:00
JustArchi
ba8d70aebb Copyright update 2017-01-02 20:05:21 +01:00
JustArchi
b7f15daa91 Misc 2016-11-24 07:49:44 +01:00
JustArchi
df218074ad Gigantic code cleanup
Time to enforce some common file layout, as general mess started to annoying me. Sorry in advance for people using custom forks and having merge conflicts, this will help everybody in long-run
2016-11-24 07:32:16 +01:00
JustArchi
8b3b822938 Rewrite entire ASF logging, as preparation for #354 2016-11-06 12:06:02 +01:00
JustArchi
4958fa82d7 Add new sell confirmation type 2016-10-29 03:02:35 +02:00
JustArchi
ab129f27c3 Code review 2016-10-01 00:56:29 +02:00
JustArchi
72b0ae21df EXPERIMENTAL: Make GetConfirmations() recursive 2016-09-29 21:04:34 +02:00
JustArchi
e2a8c14a0d Code review 2016-09-21 18:22:27 +02:00
JustArchi
444eb97f49 Remove time left from !2fa
It doesn't make any sense if code works for ~2 minutes anyway
2016-09-18 22:10:11 +02:00
JustArchi
fbbe3c1d09 Partially revert < 5 seconds waits
It seems that Valve actually accepts not one but several tokens generated close to the point of request being sent, so our 2FA code will be always valid for 1-2 more minutes after supposed timeout...
2016-09-18 20:31:06 +02:00
JustArchi
1df2c3b042 Implement my previous idea
Thanks to that, we can guarantee some room for networking, but also make users more happy as they'll never get 2FA tokens no human is capable of entering in time
2016-09-16 23:40:52 +02:00
JustArchi
feb80fbf49 Revert "Fix logging in when steam API is unavailable"
This reverts commit 5a267eb225.
2016-09-16 22:46:10 +02:00
JustArchi
5a267eb225 Fix logging in when steam API is unavailable
Or at least part of it...
2016-09-14 19:00:03 +02:00
JustArchi
e020f54753 Optimize SteamTimeDifference
In very unlikely case of actually having exactly the same time difference, notice the difference between no value and value of 0
2016-09-05 18:46:00 +02:00
JustArchi
d6c9fe3cde Add workarounds for #335 2016-08-21 22:35:31 +02:00
JustArchi
d0344a7ab9 Misc code review 2016-08-19 05:25:08 +02:00
JustArchi
58453e72ac Misc 2016-07-31 01:25:18 +02:00
JustArchi
d8aad682d5 DeviceID hardening 2016-07-31 01:22:58 +02:00
JustArchi
07af05ad00 Revert recent confirmations rate-limiting, add debug 2016-07-29 22:34:52 +02:00
JustArchi
ef5b108b34 Correct MaxConfirmationsPerRequest 2016-07-29 14:48:34 +02:00
JustArchi
fac5e65035 Fix accepting over 30 confirmations 2016-07-29 00:46:17 +02:00