Compare commits

..

580 Commits

Author SHA1 Message Date
JustArchi
6eb9b9b26d Misc 2022-06-11 18:15:46 +02:00
JustArchi
95a6cef6db Take into account trade hold durations from both sides
Previous implementations had several problems when dealing with trade holds:
- User could've configured max trade hold duration to 0, and still accept trades with hold when he's the cause of it, this is unwanted
- There is virtually no way to ensure that the other party is willing to accept our trade hold even if we allow it, so expose that detail.

This precisely answers quite rather but not impossible situation of having a trade hold with ASF 2FA, e.g. due to moving authenticator, but we're also now ready for "perpetual" trade hold with ASF 2FA, in case it ever happened.

This way, we:
- Expose to other users our max trade hold duration preference
- Users validate both their own and listed user's trade hold, and if it exceeds either their own or user's limit, bot is not considered for matching
- It also resolves problem of accepting trade offers from other people when we're on trade hold ourselves
2022-06-11 18:07:06 +02:00
JustArchi
688e1cea83 Misc style updates 2022-06-11 16:14:51 +02:00
Renovate Bot
40a479b1df Update ASF-ui digest to 574bfd6 2022-06-09 17:29:38 +00:00
ArchiBot
b535886959 Automatic translations update 2022-06-09 02:36:47 +00:00
Renovate Bot
45d0a8a9c1 Update ASF-ui digest to d22e99c 2022-06-08 05:23:14 +00:00
JustArchi
3ee2ded814 Closes #2599 2022-06-07 20:46:41 +02:00
Renovate Bot
a2b5f80f40 Update ASF-ui digest to 99609fd 2022-06-07 04:34:37 +00:00
ArchiBot
0fffbdaa52 Automatic translations update 2022-06-07 02:32:27 +00:00
JustArchi
2ec764f8ec Rewrite WebBrowser errors handling 2022-06-06 23:28:35 +02:00
JustArchi
c67aecacbc Misc 2022-06-06 23:27:22 +02:00
JustArchi
ae5b9cdc0d Merge branch 'main' of https://github.com/JustArchiNET/ArchiSteamFarm 2022-06-06 21:54:08 +02:00
JustArchi
0eab63bab5 Do not check against profile uri in AWH when caller wants redirections
It's no longer our responsibility
2022-06-06 21:54:04 +02:00
Renovate Bot
1aea4c0550 Update actions/setup-node action to v3.3.0 2022-06-06 16:12:35 +00:00
JustArchi
16c4bed95f Bump 2022-06-06 13:30:00 +02:00
JustArchi
8948817d55 Misc 2FA enhancements 2022-06-06 13:29:21 +02:00
JustArchi
6ff943aeaa Move timezoneOffset cookie back into session
It might still make sense in order to:
a) Postpone timezoneoffset calculation until we actually get logged in, which gives machine more time for re-initialization
b) Refresh it in case our timezone changes, or DST gets enabled/disabled
2022-06-06 13:23:28 +02:00
Renovate Bot
0576bbd3aa Update ASF-ui digest to 8ba8738 2022-06-06 02:41:44 +00:00
ArchiBot
6e70956ee9 Automatic translations update 2022-06-06 02:36:02 +00:00
Renovate Bot
77409699f0 Update wiki digest to 6647581 2022-06-05 18:08:58 +00:00
Sebastian Göls
dae3e93031 Make use of "or" keyword in switch statements (#2598) 2022-06-05 15:59:34 +02:00
JustArchi
3041850b92 Bump 2022-06-05 12:46:24 +02:00
JustArchi
7c00d8d03d Misc 2FA enhancements 2022-06-05 12:39:04 +02:00
JustArchi
aedad9d5b3 Closes #2596 2022-06-05 12:15:42 +02:00
JustArchi
ff7f661197 Misc 2022-06-04 22:46:37 +02:00
JustArchi
e57cc21b89 Update .gitignore 2022-06-04 22:06:01 +02:00
JustArchi
06bfe01087 Misc 2022-06-04 21:41:07 +02:00
JustArchi
bcceb0c39c Downgrade AngleSharp.XPath due to https://github.com/AngleSharp/AngleSharp.XPath/issues/36 2022-06-04 21:41:02 +02:00
Renovate Bot
996ee66554 Update ASF-ui digest to 6dcd14d 2022-06-04 09:57:02 +00:00
renovate[bot]
dad19956aa Update dependency AngleSharp.XPath to v2 (#2595)
* Update dependency AngleSharp.XPath to v2

* Update GitHub.cs

* netf fixes

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: JustArchi <JustArchi@JustArchi.net>
2022-06-04 11:56:36 +02:00
Renovate Bot
beeda2777d Update ASF-ui digest to 293db61 2022-06-03 06:16:50 +00:00
ArchiBot
53e06a7392 Automatic translations update 2022-06-03 02:32:08 +00:00
Renovate Bot
9a1d4913a0 Update ASF-ui digest to a53bdb7 2022-06-02 18:43:12 +00:00
ArchiBot
c65b40b45b Automatic translations update 2022-06-02 02:39:09 +00:00
Renovate Bot
23647f2e39 Update wiki digest to d48f2bf 2022-06-01 22:07:32 +00:00
JustArchi
feb7a72bd1 Bump 2022-06-01 21:14:13 +02:00
Łukasz Domeradzki
7fe5989f5d Rewrite Steam time to ulongs (#2594)
My latest "research" resulted in learning that under the hood, Steam unix time seconds is bullet-proof not only for year 2038 but for uint range as well. While I do not expect to be alive by 2106, let alone ASF still being operative, it makes sense to base our time on the correct backend implementation regardless.

Small breaking change for people using `GetUnixTime()`.
2022-06-01 21:13:50 +02:00
Łukasz Domeradzki
715ed034df Unify WebBrowser API in regards to nullable bodies (#2593)
* Unify logic for nullable bodies

* Update ArchiWebHandler.cs

* Misc
2022-06-01 21:13:40 +02:00
JustArchi
d82df0074f Bump 2022-06-01 16:47:24 +02:00
JustArchi
03c2ba049e Fix NLog
Without this, default ASP.NET console logger is still active, even if we don't want it
2022-06-01 16:45:53 +02:00
Renovate Bot
03bce5dd71 Update ASF-ui digest to 5c7d999 2022-05-31 22:28:53 +00:00
ArchiBot
023e38d5e0 Automatic translations update 2022-05-29 02:39:26 +00:00
JustArchi
6178b12bb1 Fix invalid STD retry on 429 without json body
It's getting more and more complicated... We have places where we accept errors but still want relevant JSON body (most of the Steam error-places), and now we also have a place where we expected error to not carry one. Moreover, we still want to account for invalid JSON body on 2xx and retry on them.

So let's make the code even more complicated than it already is by adding yet another endpoint that does exactly the same what the other endpoint does BUT allows us us to optionally accept null/invalid body on success/errors/both, lol. I hate myself.

Maybe we can obsolete the first endpoint eventually and stick with just the second?
2022-05-28 20:41:52 +02:00
ArchiBot
df95b82b10 Automatic translations update 2022-05-28 02:29:19 +00:00
Renovate Bot
93ac0b4e4a Update ASF-ui digest to c42a9b8 2022-05-27 04:03:04 +00:00
ArchiBot
38fc3ba6a3 Automatic translations update 2022-05-27 02:39:00 +00:00
Renovate Bot
2e87b78b45 Update wiki digest to c5694c9 2022-05-26 17:44:51 +00:00
Renovate Bot
dae256f069 Update ASF-ui digest to fa42805 2022-05-26 15:10:16 +00:00
renovate[bot]
8452c46c47 Update crazy-max/ghaction-import-gpg action to v5 (#2592)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-05-26 17:09:43 +02:00
Sebastian Göls
68e30b43c2 Use ArgumentNullException.ThrowIfNull when possible (#2591)
* Misc.

* Fix mistake
2022-05-26 13:29:12 +02:00
JustArchi
c9b1e46013 Avoid crash when executing STD command with disabled STD plugin 2022-05-26 11:47:11 +02:00
JustArchi
fd9770d78e Bump 2022-05-26 11:05:59 +02:00
Renovate Bot
a4374389b8 Update dependency ConfigureAwaitChecker.Analyzer to v5.0.0.1 2022-05-26 03:12:12 +00:00
ArchiBot
082cab42df Automatic translations update 2022-05-26 02:38:09 +00:00
Renovate Bot
3ff80b37f3 Update ASF-ui digest to 1bf5b24 2022-05-25 20:21:25 +00:00
JustArchi
07c354f9e7 Commit the most misc optimization in history
I found it accidentally, lol
2022-05-25 20:04:54 +02:00
Sebastian Göls
b83f8fc669 Update Program.cs (#2589) 2022-05-25 17:18:06 +02:00
Renovate Bot
d6a2f53ab0 Update wiki digest to f26dbc5 2022-05-25 11:51:00 +00:00
JustArchi
0261623ea9 Expose FinalUri in BasicResponse for plugins usage 2022-05-24 12:25:43 +02:00
JustArchi
b5ca484c2b Add ReturnRedirections for plugins usage
This will allow caller to handle redirections manually
2022-05-24 12:13:54 +02:00
Renovate Bot
a7c30e4878 Update ASF-ui digest to a790c6c 2022-05-22 03:51:41 +00:00
Renovate Bot
f26a4ae864 Update ASF-ui digest to 24ff55f 2022-05-21 05:09:18 +00:00
Renovate Bot
c2018b53a5 Update actions/upload-artifact action to v3.1.0 2022-05-20 20:28:10 +00:00
JustArchi
55421bb29f Throw on lack of previousMethodName
I don't believe we should support those calls for anything that doesn't supply it. Actually add another layer of safeguards.
2022-05-20 21:36:22 +02:00
Renovate Bot
52eabe4daf Update ASF-ui digest to 46fe13d 2022-05-20 05:16:48 +00:00
ArchiBot
86fc8a765c Automatic translations update 2022-05-20 02:34:05 +00:00
JustArchi
9162752b99 Misc 2022-05-19 21:38:40 +02:00
JustArchi
4436e8dc43 Add STD command trigger for STD plugin 2022-05-19 21:34:57 +02:00
JustArchi
1f0b996cf5 Improve login procedure
- Allow user to recover from SteamGuard/2FA failures when inputting manually
- Unify login failures in a single mechanism
- Add fallback for Steam informing us about lack of 2FA code when actually having mobile authenticator and supplying it (ultra rare screwup)
2022-05-19 15:33:53 +02:00
ArchiBot
4dc7acb914 Automatic translations update 2022-05-19 02:39:10 +00:00
Renovate Bot
d570a17532 Update wiki digest to 6958aab 2022-05-18 14:59:10 +00:00
Renovate Bot
e5184adede Update ASF-ui digest to 790ff09 2022-05-18 14:58:40 +00:00
JustArchi
13a5fa7c02 Misc 2022-05-18 11:45:31 +02:00
JustArchi
c698fe7b07 Bump 2022-05-18 11:31:49 +02:00
JustArchi
a08c85e40b Increase interactive console responsiveness, misc
Previously we were sleeping always, also after execution of the command and after wrong keys being pressed, which resulted in excessive delay if user mashed his keyboard like a madman before hitting c to enter the console, entirely unnecessarily.
2022-05-18 11:30:46 +02:00
JustArchi
055af32219 Address missed NLog breaking change 2022-05-18 11:20:35 +02:00
ArchiBot
080b500ebf Automatic translations update 2022-05-18 02:33:30 +00:00
JustArchi
4a329b0b15 Bump 2022-05-17 23:03:42 +02:00
JustArchi
e2494960ae Bump 2022-05-17 23:02:14 +02:00
JustArchi
2e987ccee6 Address NLog changes 2022-05-17 20:12:57 +02:00
renovate[bot]
99284e22c9 Update dependency NLog.Web.AspNetCore to v5 (#2579)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-05-17 20:09:34 +02:00
renovate[bot]
37eac5844e Update ASF-ui digest to 664643e (#2578)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-05-17 11:41:52 +02:00
Renovate Bot
35f295a860 Update ASF-ui digest to 8d0abfb 2022-05-16 19:07:27 +00:00
Renovate Bot
29d047271e Update actions/setup-node action to v3.2.0 2022-05-16 14:03:52 +00:00
Renovate Bot
948a86bfc9 Update ASF-ui digest to 2fe4a70 2022-05-16 04:50:08 +00:00
ArchiBot
f853c61821 Automatic translations update 2022-05-16 02:25:24 +00:00
JustArchi
5b1cb16c98 Stop wasting CPU cycles! 2022-05-13 19:33:08 +02:00
JustArchi
bdac1b2782 Bump 2022-05-13 18:22:24 +02:00
JustArchi
7532b89fd0 Closes #2572
At least the code is now shorter, lol
2022-05-13 18:15:15 +02:00
JustArchi
7cd351d1cd Misc
This applies only to Debug builds, as Release ones don't use checked arithmetic anyway
2022-05-13 18:12:31 +02:00
Renovate Bot
9c8d63318e Update ASF-ui digest to bb59242 2022-05-13 05:08:45 +00:00
ArchiBot
f0c0e07489 Automatic translations update 2022-05-13 02:42:57 +00:00
ArchiBot
d2e79ff3a4 Automatic translations update 2022-05-12 02:33:43 +00:00
Renovate Bot
ab7b998e3b Update dependency Microsoft.NET.Test.Sdk to v17.2.0 2022-05-11 21:19:10 +00:00
Łukasz Domeradzki
9c88d14c8e Resolve NU1507 (#2575)
* Attempt to resolve NU1507

* Let's try this then

* Revert "Let's try this then"

This reverts commit 86ef6f9abf.

* How about this

* And this?

* So why not this?

* And this?

* Revert "And this?"

This reverts commit e43fc83dcc.

* Revert "So why not this?"

This reverts commit e630dd8365.
2022-05-11 20:11:58 +02:00
ArchiBot
9a3c3bdbaf Automatic translations update 2022-05-11 02:35:21 +00:00
Renovate Bot
7b3598af20 Update dotnet monorepo to v3.1.25 2022-05-10 19:23:40 +00:00
Renovate Bot
35d2156855 Update ASF-ui digest to b22bef8 2022-05-10 16:40:51 +00:00
JustArchi
d589da7a39 Bump 2022-05-10 11:14:11 +02:00
JustArchi
c10de94bd0 Closes #2571 2022-05-10 11:11:45 +02:00
Renovate Bot
d164296d7e Update actions/setup-dotnet action to v2.1.0 2022-05-09 10:21:58 +00:00
Renovate Bot
b378a76072 Update ASF-ui digest to 0ed48ea 2022-05-08 22:02:09 +00:00
Archi
263a2db476 CI: Remove excessive continue on errors 2022-05-08 23:01:45 +02:00
Renovate Bot
61549fc983 Update ASF-ui digest to 1f02912 2022-05-07 03:46:37 +00:00
ArchiBot
19aad04143 Automatic translations update 2022-05-07 02:24:04 +00:00
Renovate Bot
5a5f3c6786 Update ASF-ui digest to a9ddf4a 2022-05-06 22:30:53 +00:00
Renovate Bot
bd68df2fd6 Update crowdin/github-action action to v1.4.9 2022-05-06 16:18:34 +00:00
renovate[bot]
2a97644468 Update docker/build-push-action action to v3 (#2565)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-05-06 10:20:55 +02:00
renovate[bot]
5304ca3e07 Update docker/login-action action to v2 (#2566)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-05-06 10:20:50 +02:00
renovate[bot]
f0471ac0eb Update docker/setup-buildx-action action to v2 (#2567)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-05-06 10:20:42 +02:00
ArchiBot
b0e7f1963c Automatic translations update 2022-05-06 02:27:24 +00:00
Renovate Bot
78990e8aff Update wiki digest to b43bf17 2022-05-05 13:03:59 +00:00
Renovate Bot
b871970d85 Update ASF-ui digest to 722f6b2 2022-05-05 00:18:06 +00:00
ArchiBot
d563a20288 Automatic translations update 2022-05-04 02:36:40 +00:00
Renovate Bot
b2fefa4476 Update wiki digest to 37d8dcc 2022-05-03 11:51:02 +00:00
ArchiBot
840cf25ea4 Automatic translations update 2022-04-30 02:36:10 +00:00
Renovate Bot
79587f68d7 Update ASF-ui digest to a351077 2022-04-30 00:09:30 +00:00
Archi
45adf9c1a1 Bump 2022-04-29 20:25:59 +02:00
Archi
1dcf98c849 Fix SteamPassword input
Asking for password with encryption enabled always resulted in an error, as the password wasn't properly set to the plaintext and we were back to square one.

The previous logic was overly complex, I don't know why, this should achieve the same and be much easier to understand while at it.
2022-04-29 17:55:33 +02:00
ArchiBot
a826b7f9b7 Automatic translations update 2022-04-29 02:37:09 +00:00
Renovate Bot
85c8397cf7 Update docker/setup-buildx-action action to v1.7.0 2022-04-28 11:01:51 +00:00
ArchiBot
dbf1c1ba51 Automatic translations update 2022-04-28 02:50:54 +00:00
Renovate Bot
359439e306 Update ASF-ui digest to 892742c 2022-04-27 13:48:33 +00:00
ArchiBot
763766e092 Automatic translations update 2022-04-27 02:42:35 +00:00
Renovate Bot
a4a347e957 Update mstest monorepo to v2.2.10 2022-04-26 22:17:23 +00:00
Renovate Bot
844ca93647 Update wiki digest to 0c633a3 2022-04-26 18:49:18 +00:00
Renovate Bot
16fe445ea9 Update ASF-ui digest to 83c8a83 2022-04-26 18:48:48 +00:00
Renovate Bot
34bf8fb84f Update crazy-max/ghaction-import-gpg action to v4.4.0 2022-04-25 14:36:52 +00:00
Renovate Bot
4873cd337a Update ASF-ui digest to 5554b10 2022-04-25 03:07:32 +00:00
ArchiBot
8c0249a62d Automatic translations update 2022-04-25 02:33:43 +00:00
ArchiBot
220ecf0c38 Automatic translations update 2022-04-24 02:24:03 +00:00
Renovate Bot
ebd79425f4 Update wiki digest to 370d1b3 2022-04-23 18:48:11 +00:00
Renovate Bot
2eaf934dde Update dependency Markdig.Signed to v0.30.2 2022-04-23 14:22:52 +00:00
Archi
599cd9bff8 Bump 2022-04-23 15:02:37 +02:00
Archi
339e83a818 Use saner custom schema IDs in swagger 2022-04-23 14:58:22 +02:00
Archi
f083bb2d3b Closes #2558 2022-04-23 13:11:10 +02:00
Archi
9f68d17a28 Add initialization for Madness
This is probably not needed, but might come useful in the future.
2022-04-23 13:09:51 +02:00
Renovate Bot
d8413f9633 Update ASF-ui digest to 5a6f341 2022-04-23 04:05:53 +00:00
ArchiBot
27d9d61309 Automatic translations update 2022-04-23 02:24:12 +00:00
Renovate Bot
2fc92ce427 Update dependency JustArchiNET.Madness to v3.5.2 2022-04-22 16:54:52 +00:00
Renovate Bot
86d94a7bbe Update swashbuckle-aspnetcore monorepo to v6.3.1 2022-04-22 14:44:55 +00:00
Renovate Bot
9647db8bf7 Update dependency Markdig.Signed to v0.30.1 2022-04-22 11:13:08 +00:00
Renovate Bot
2ce5018d62 Update ASF-ui digest to f23f502 2022-04-22 05:37:01 +00:00
ArchiBot
61768dbeb9 Automatic translations update 2022-04-22 02:41:44 +00:00
Renovate Bot
37ced5d4e3 Update dependency Markdig.Signed to v0.30.0 2022-04-21 19:21:48 +00:00
Renovate Bot
c1a695de7b Update actions/checkout action to v3.0.2 2022-04-21 16:13:25 +00:00
Renovate Bot
7040bdabf6 Update ASF-ui digest to e1d754d 2022-04-21 12:28:06 +00:00
ArchiBot
14512aec71 Automatic translations update 2022-04-21 02:36:31 +00:00
Renovate Bot
40d67ac185 Update dependency Markdig.Signed to v0.29.0 2022-04-20 18:53:26 +00:00
Renovate Bot
7de67e84f9 Update ASF-ui digest to 992113b 2022-04-20 04:04:09 +00:00
Renovate Bot
6c9df75a1a Update ASF-ui digest to 18c96be 2022-04-19 14:39:57 +00:00
ArchiBot
b98d8405e1 Automatic translations update 2022-04-19 02:37:37 +00:00
Archi
062b241232 Misc 2022-04-18 21:08:30 +02:00
Archi
b5af510eb9 Improve weak passwords reasons 2022-04-18 20:35:47 +02:00
renovate[bot]
2edcb7a0ce Update dependency JetBrains.Annotations to v2022 (#2557)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-04-18 19:56:26 +02:00
ArchiBot
58cf93ff48 Automatic translations update 2022-04-18 02:35:31 +00:00
Renovate Bot
9f0f3339c5 Update wiki digest to d965790 2022-04-17 12:56:19 +00:00
ArchiBot
6b88d49067 Automatic translations update 2022-04-17 02:23:50 +00:00
ArchiBot
b4e102682f Automatic translations update 2022-04-16 02:23:14 +00:00
Renovate Bot
a580c85234 Update wiki digest to 55b7332 2022-04-15 21:17:18 +00:00
Renovate Bot
a3cce515ec Update ASF-ui digest to e0d5a20 2022-04-15 18:48:42 +00:00
Archi
1f21c1f9f6 Bump 2022-04-15 19:41:18 +02:00
Archi
9c7014d5c1 Misc 2022-04-15 19:38:56 +02:00
Archi
0a01dfa22b Misc 2022-04-15 19:37:18 +02:00
qhy040404
a8bb107e23 Update README.md (#2555) 2022-04-15 19:24:07 +02:00
Renovate Bot
151f6cfe4a Update actions/checkout action to v3.0.1 2022-04-14 20:13:59 +00:00
Renovate Bot
d21e398ac0 Update crowdin/github-action action to v1.4.8 2022-04-14 03:10:04 +00:00
ArchiBot
16f7f82dc0 Automatic translations update 2022-04-14 02:28:46 +00:00
Renovate Bot
8a6a02e034 Update ASF-ui digest to ffa260b 2022-04-13 22:08:23 +00:00
Sebastian Göls
b8bfcd5df3 Simplify LogNullError calls (#2554)
* Remove necessity of nameof(...) in calls to ArchiLogger.LogNullError(...)

* Upgrade Madness

* Upgrade Madness

* Split up compound null log statements
2022-04-13 23:16:36 +02:00
Sebastian Göls
2326196e01 Slightly deduplicate utility code (#2553) 2022-04-13 21:44:57 +02:00
ArchiBot
380d785388 Automatic translations update 2022-04-13 02:29:12 +00:00
Renovate Bot
edd82b365c Update wiki digest to ced81fb 2022-04-12 19:39:24 +00:00
Renovate Bot
d49d106d64 Update dotnet monorepo to v3.1.24 2022-04-12 00:05:28 +00:00
Archi
78407fbd9c Remove obsolete statistics mapping
This already skipped one monthly cycle, everybody who remotely cares to use up-to-date ASF is already migrated to proper config, everybody else is not making use of it either way
2022-04-12 00:52:19 +02:00
Archi
1a87149765 Correct doc 2022-04-12 00:48:24 +02:00
Renovate Bot
f260015098 Update ASF-ui digest to 9bc1e73 2022-04-11 19:13:41 +00:00
Renovate Bot
5016abe45e Update actions/setup-node action to v3.1.1 2022-04-11 14:10:40 +00:00
Renovate Bot
2238897f37 Update ASF-ui digest to 02f5fc8 2022-04-11 03:47:19 +00:00
ArchiBot
493f40a97c Automatic translations update 2022-04-11 02:29:56 +00:00
Renovate Bot
5ec7ca050b Update ASF-ui digest to b16b9fa 2022-04-09 01:36:03 +00:00
ArchiBot
f727403295 Automatic translations update 2022-04-08 02:26:07 +00:00
Renovate Bot
027d23d894 Update ASF-ui digest to 8df1cd1 2022-04-07 20:37:03 +00:00
Renovate Bot
f36798b2c3 Update ASF-ui digest to 082828a 2022-04-07 11:00:19 +00:00
ArchiBot
202a92f66f Automatic translations update 2022-04-07 02:23:49 +00:00
Renovate Bot
48b2a4c859 Update wiki digest to 309c165 2022-04-06 22:51:35 +00:00
Renovate Bot
cfbc3d749f Update ASF-ui digest to 49413ea 2022-04-06 21:06:44 +00:00
Archi
a76af71227 Update RELEASE_TEMPLATE.md 2022-04-06 20:49:17 +02:00
Archi
cc5e5dfcc9 Bump 2022-04-06 20:18:01 +02:00
Archi
a185f2f03d Fix steam parental mess 2022-04-06 20:12:01 +02:00
Archi
3772b303c5 Bump 2022-04-06 17:09:02 +02:00
Archi
d6ed6e81a4 Let's try declaring base Chinese instead 2022-04-06 15:43:13 +02:00
Archi
0bbc85527a Allow cmdline arg for forbidding Steam parental generation 2022-04-06 14:16:26 +02:00
Archi
1eabe3a5ed Fix netf brain damage 2022-04-06 14:05:10 +02:00
Archi
f95b6bf089 Refuse to accept SteamParentalCode other than 4 0-9 digits 2022-04-06 13:58:35 +02:00
Renovate Bot
ff7b4582c7 Update ASF-ui digest to 498c8de 2022-04-06 00:07:06 +00:00
Renovate Bot
7e7fb9cd16 Update ASF-ui digest to 8f5ce0b 2022-04-05 19:39:26 +00:00
Archi
65bbaf628e Bump 2022-04-05 20:28:49 +02:00
Archi
db2cbde708 Bump 2022-04-05 20:28:30 +02:00
ArchiBot
b701acf72f Automatic translations update 2022-04-05 02:23:19 +00:00
Łukasz Domeradzki
ceb021dbdf Use windows-latest runner again (#2547)
* Attempt at resolving https://github.com/actions/virtual-environments/issues/5189

* Clean up dockerfiles from no longer required workarounds
2022-04-04 22:06:03 +02:00
ArchiBot
ce1c77780d Automatic translations update 2022-04-04 02:29:49 +00:00
Renovate Bot
5b7858c2a0 Update wiki digest to a05a01e 2022-04-03 19:13:33 +00:00
Archi
635afa7165 Update Madness 2022-04-02 16:41:48 +02:00
Archi
c79c314b20 Fix generic-netf
Again and again!
2022-04-02 16:08:41 +02:00
Archi
ec78ad1ac2 Add overflow-related fixes and improvements 2022-04-02 16:00:07 +02:00
Archi
9273d73640 Check for overflow and underflow in debug builds 2022-04-02 13:58:55 +02:00
Renovate Bot
d598b99a1e Update ASF-ui digest to ba9a208 2022-04-02 05:05:07 +00:00
Renovate Bot
f12b00bb4c Update ASF-ui digest to c7e3eee 2022-04-01 20:10:36 +00:00
Renovate Bot
ff7116d2ac Update actions/setup-node action to v3.1.0 2022-04-01 11:47:41 +00:00
Renovate Bot
ee435fc628 Update ASF-ui digest to d282988 2022-03-31 06:34:58 +00:00
Renovate Bot
c8f02779b6 Update ASF-ui digest to a78474f 2022-03-30 03:27:46 +00:00
ArchiBot
83667ed7c3 Automatic translations update 2022-03-30 02:50:37 +00:00
Archi
387ef3e0dd Update revolut handle 2022-03-30 00:41:27 +02:00
ArchiBot
7e8c6b7fb3 Automatic translations update 2022-03-29 02:24:49 +00:00
Renovate Bot
e97b440225 Update wiki digest to a9d72e4 2022-03-28 22:59:44 +00:00
ArchiBot
b1db99f328 Automatic translations update 2022-03-28 02:25:26 +00:00
Renovate Bot
ace0ca4555 Update dependency Markdig.Signed to v0.28.1 2022-03-27 09:46:26 +00:00
ArchiBot
33767ace78 Automatic translations update 2022-03-27 02:21:44 +00:00
Renovate Bot
5d5a76de40 Update ASF-ui digest to 711c0f2 2022-03-26 03:19:31 +00:00
ArchiBot
582680f69d Automatic translations update 2022-03-26 02:21:11 +00:00
ArchiBot
e65729ee1a Automatic translations update 2022-03-25 02:21:29 +00:00
Archi
83a353dfe0 Bump 2022-03-24 22:28:40 +01:00
ArchiBot
aea7c7640c Automatic translations update 2022-03-24 02:22:40 +00:00
Łukasz Domeradzki
7118185ac5 Remove support for IPC localization (#2545) 2022-03-24 01:47:12 +01:00
Renovate Bot
b681b74ee6 Update ASF-ui digest to 871721c 2022-03-22 20:45:48 +00:00
Archi
cc83222c3e Use shorter syntax for json properties 2022-03-22 16:33:47 +01:00
Archi
6c570738ee Fix handling inventory loading errors
"success" doesn't have to exist as a property in error json
2022-03-22 14:57:48 +01:00
Archi
393ddf6f10 Misc optimization 2022-03-22 12:27:07 +01:00
renovate[bot]
75a7df2751 Update peter-evans/dockerhub-description action to v3 (#2542)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-03-22 11:37:59 +01:00
Archi
0c3dfaa4ae Use generic delay for all unhandled disconnects
There are only handful of cases where we want to reconnect immediately, and login limiter delay usually kills those anyway
2022-03-21 14:50:36 +01:00
Renovate Bot
94e70e5ac2 Update ASF-ui digest to 97dcaf2 2022-03-19 01:15:00 +00:00
Archi
9ce527c938 Bump 2022-03-18 19:51:04 +01:00
Renovate Bot
660b05e4c4 Update ASF-ui digest to 0f8dfef 2022-03-18 11:13:17 +00:00
Archi
b39efb2b03 Re-enable ASF-ui updates 2022-03-18 12:12:38 +01:00
ArchiBot
53e0b62ced Automatic translations update 2022-03-18 02:21:32 +00:00
ArchiBot
d3980962fe Automatic translations update 2022-03-17 02:20:45 +00:00
Renovate Bot
517787efb8 Update wiki digest to 6505a66 2022-03-16 17:55:41 +00:00
lrcf
d06afa26d4 LICENSE-2.0.txt > LICENSE.txt (#2539) 2022-03-16 16:41:08 +01:00
Archi
4562e71e47 Misc 2022-03-16 15:34:37 +01:00
Renovate Bot
894471fa82 Update crazy-max/ghaction-import-gpg action to v4.3.0 2022-03-16 03:40:33 +00:00
ArchiBot
e9f6c15ba1 Automatic translations update 2022-03-16 02:21:54 +00:00
ArchiBot
814b93d1cf Automatic translations update 2022-03-15 02:19:58 +00:00
Renovate Bot
beafbd8f43 Update docker/build-push-action action to v2.10.0 2022-03-14 20:06:32 +00:00
ArchiBot
dbd0e006ed Automatic translations update 2022-03-14 02:18:10 +00:00
ArchiBot
4661803836 Automatic translations update 2022-03-13 02:13:18 +00:00
Renovate Bot
99ecd72660 Update wiki digest to 791cfff 2022-03-12 23:59:22 +00:00
Archi
799ec2965f Bump 2022-03-12 22:34:55 +01:00
Archi
c7e9c0c3b0 Bump 2022-03-12 22:34:35 +01:00
Sebastian Göls
1f3e861612 Correctly detect steam deck keyboard skins (#2535) 2022-03-12 22:16:45 +01:00
Renovate Bot
159b0620a7 Update dependency Markdig.Signed to v0.28.0 2022-03-11 14:37:14 +00:00
ArchiBot
e508602be7 Automatic translations update 2022-03-11 02:20:00 +00:00
Archi
6edf62d849 Set initial state of ShouldResumeFarming to false
ShouldResumeFarming indicates whether call to Resume() should start farming, which is used for example when account is marked as free to farm due to event. That event by default is triggered on ASF startup as well.

At the same time, the prerequisite to start farming is having our cache ready at least for the bot that is about to start farming. This happens in OnBotLicenseList() which notified CardsFarmer about new games added once it finishes, which also triggers the farming.

Previous behaviour resulted in a bit unwanted situation where CardsFarmer didn't bother waiting for cache to be ready, as the event about occupation triggered resume process, and that process due to true value started immediately. Changing default state of that value to false should suffice, as initial resume event won't cause the cards farming process to be started, and event about new games added already sets that flag back to true, so if cache being rebuilt happens before playing lock being released, Resume() should still trigger farming as wanted.

Give yourself a pat on the back if you understood something from that.
2022-03-10 12:36:31 +01:00
ArchiBot
021d414143 Automatic translations update 2022-03-09 02:19:23 +00:00
Renovate Bot
813587508e Update dotnet monorepo to v3.1.23 2022-03-08 16:53:12 +00:00
Renovate Bot
0e3d124663 Update swashbuckle-aspnetcore monorepo to v6.3.0 2022-03-08 02:27:31 +00:00
ArchiBot
91115b7cb7 Automatic translations update 2022-03-08 02:16:20 +00:00
Archi
0f12174564 Bump 2022-03-07 18:43:29 +01:00
Łukasz Domeradzki
d087aacbfb Closes #2532 2022-03-07 18:35:41 +01:00
Archi
1c0d2d88ed Address crowdin-cli 3.7.8 breaking change
And ensure it doesn't fail silently again the next time something like that happens

https://github.com/crowdin/crowdin-cli/issues/439
2022-03-07 13:28:32 +01:00
renovate[bot]
6b170c345d Update actions/upload-artifact action to v3 (#2530)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-03-03 20:39:53 +01:00
Archi
bc8a4a50d2 Bump 2022-03-03 14:51:41 +01:00
Archi
e025df3d9b Downgrade ASF-ui due to https://github.com/JustArchiNET/ASF-ui/issues/1556 2022-03-03 13:42:59 +01:00
renovate[bot]
5a97835531 Update actions/download-artifact action to v3 (#2529)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-03-02 22:33:21 +01:00
Renovate Bot
bce0557873 Update wiki commit hash to 98a9726 2022-03-02 17:07:56 +00:00
renovate[bot]
4c7cd204ce Update ASF-ui commit hash to 59d9442 (#2527)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-03-02 15:26:59 +01:00
Renovate Bot
7ba6b230df Update docker/login-action action to v1.14.1 2022-03-01 22:22:02 +00:00
renovate[bot]
6c4fba5173 Update actions/checkout action to v3 (#2526)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-03-01 20:41:47 +01:00
Renovate Bot
5cd6477b69 Update ASF-ui commit hash to 02d5b8d 2022-03-01 15:37:38 +00:00
Renovate Bot
1f5fbb5f92 Update crazy-max/ghaction-import-gpg action to v4.2.0 2022-03-01 10:35:48 +00:00
Renovate Bot
d0521ff9ca Update docker/login-action action to v1.14.0 2022-02-28 10:38:03 +00:00
Renovate Bot
1be15716fc Update ASF-ui commit hash to bdb5a1c 2022-02-26 03:47:28 +00:00
Archi
e00ee2cc55 Misc 2022-02-26 01:26:13 +01:00
Archi
8893fc8e70 Misc 2022-02-26 01:21:37 +01:00
renovate[bot]
86b41f0542 Update actions/setup-dotnet action to v2 (#2523)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-02-25 11:37:22 +01:00
Renovate Bot
a245c091a4 Update ASF-ui commit hash to 4b46137 2022-02-25 00:43:54 +00:00
Archi
abbe0cca22 Bump 2022-02-25 00:35:12 +01:00
Archi
d1c2b103b6 Closes #2522 2022-02-25 00:29:51 +01:00
Renovate Bot
9f1734efb7 Update ASF-ui commit hash to e35e350 2022-02-24 16:15:05 +00:00
renovate[bot]
729c2e889c Update actions/setup-node action to v3 (#2521)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-02-24 15:23:23 +01:00
Archi
a9edc7ad7a Bump 2022-02-24 14:17:11 +01:00
Renovate Bot
08a6486c00 Update actions/setup-dotnet action to v1.9.1 2022-02-24 09:23:50 +00:00
Renovate Bot
ca3bc1becd Update ASF-ui commit hash to 0113980 2022-02-22 11:53:12 +00:00
Renovate Bot
fe5028a399 Update crowdin/github-action action to v1.4.7 2022-02-18 16:53:00 +00:00
Archi
c1d9d04071 Rider cleanup & improvements 2022-02-18 15:40:33 +01:00
Renovate Bot
e5ae2abbf0 Update ASF-ui commit hash to 938820c 2022-02-18 12:29:14 +00:00
Archi
41fa5de5a8 Misc 2022-02-18 12:55:47 +01:00
Archi
697b78aa21 Don't expose SteamLogin in weak password warning
While not strictly a sensitive property, there is no good reason why we should print it in the log instead of a bot name, which is far less sensitive in nature.
2022-02-18 11:16:31 +01:00
Renovate Bot
1a7be0bac8 Update ASF-ui commit hash to 354a986 2022-02-18 02:25:11 +00:00
ArchiBot
9d88972ae0 Automatic translations update 2022-02-18 02:12:06 +00:00
Renovate Bot
aec4130afe Update ASF-ui commit hash to cb7478d 2022-02-17 18:36:45 +00:00
Renovate Bot
64228cd3d9 Update docker/login-action action to v1.13.0 2022-02-17 15:07:39 +00:00
Archi
3568a0e528 Make GetFirstSteamMasterID() public API 2022-02-17 13:50:45 +01:00
Archi
38c2b51f2b Make GetTradeToken() public API 2022-02-17 10:59:49 +01:00
Archi
450f365817 Expose GetProxyAccess() as public API 2022-02-17 10:54:55 +01:00
Renovate Bot
cf3f6aabdf Update ASF-ui commit hash to 898e3d5 2022-02-17 03:54:33 +00:00
Renovate Bot
842fb6e304 Update dependency Microsoft.NET.Test.Sdk to v17.1.0 2022-02-16 15:28:50 +00:00
Renovate Bot
a1169331aa Update ASF-ui commit hash to 6b45078 2022-02-16 03:39:15 +00:00
ArchiBot
2fb7d62e06 Automatic translations update 2022-02-16 02:13:41 +00:00
Renovate Bot
4e57153e91 Update ASF-ui commit hash to 9261c65 2022-02-15 21:39:10 +00:00
Renovate Bot
d2e78b6970 Update ASF-ui commit hash to d3543c3 2022-02-14 20:49:07 +00:00
Renovate Bot
ccef6554fe Update ASF-ui commit hash to 8d45f06 2022-02-13 18:06:17 +00:00
Renovate Bot
97875a87c2 Update ASF-ui commit hash to c42dc16 2022-02-13 03:58:51 +00:00
ArchiBot
2684f99563 Automatic translations update 2022-02-13 02:10:27 +00:00
Renovate Bot
a50318dc8b Update ASF-ui commit hash to 6b5e890 2022-02-12 22:05:07 +00:00
Renovate Bot
eeccc36fe4 Update ASF-ui commit hash to 7071136 2022-02-12 09:47:20 +00:00
Renovate Bot
1ead134578 Update ASF-ui commit hash to aa8a4af 2022-02-12 03:59:25 +00:00
ArchiBot
f03f8ebe70 Automatic translations update 2022-02-12 02:13:03 +00:00
Łukasz Domeradzki
aa8b360e1d Update README.md 2022-02-11 10:54:32 +01:00
Renovate Bot
8c22f9929c Update ASF-ui commit hash to 41e74a9 2022-02-11 03:03:36 +00:00
ArchiBot
3795b2de3a Automatic translations update 2022-02-11 02:10:40 +00:00
Archi
f4650fe570 Misc 2022-02-11 00:07:48 +01:00
Archi
fec57e0fff Preserve CachedCardCountsForGame across ASF runs 2022-02-11 00:05:43 +01:00
Archi
8e47a5906f Optimize SendCompletedSets() 2022-02-10 23:52:49 +01:00
Renovate Bot
f728ddf737 Update wiki commit hash to 27140b9 2022-02-10 19:43:12 +00:00
Archi
173cec5ef7 Bump 2022-02-10 20:14:51 +01:00
Archi
d16c4822eb Bump 2022-02-10 20:14:35 +01:00
Archi
03e3d74e51 Allow more than one persona flag to be used 2022-02-10 20:10:34 +01:00
Archi
0a3d011e2e More advanced improvements over persona state 2022-02-10 19:55:32 +01:00
Archi
f112a05569 Rider cleanup after merge 2022-02-10 19:44:53 +01:00
Deyvan
1c579d96ee Add VR to UserInterfaceMode (#2511)
* Add VR to UserInterfaceMode

* Add VRMode to BotConfig

* Add logic for VRMode

* Remove VR from EUserInterfaceMode

* Remake VRMode -> PersonaStateFlags

* Rename PersonaStateFlags -> OnlineFlags for more user-friendly

* Parameter checks for SetPersonaStateFlags

* oops

* Update Bot.cs
2022-02-10 19:42:42 +01:00
ArchiBot
19a0be1d26 Automatic translations update 2022-02-10 02:08:21 +00:00
Renovate Bot
a8de495c7c Update ASF-ui commit hash to ff43133 2022-02-09 03:04:43 +00:00
ArchiBot
ab8ceab055 Automatic translations update 2022-02-09 02:12:42 +00:00
Renovate Bot
64b72d1e55 Update ASF-ui commit hash to c7acea4 2022-02-08 22:28:45 +00:00
Łukasz Domeradzki
f807bdb660 Fix permissions when proxifying commands (#2509)
* Fix permissions when proxifying commands

* Version bump
2022-02-08 23:17:03 +01:00
Archi
5b66b70566 Add PlayingWasBlocked logic to GamesPlayedWhileIdle 2022-02-08 17:42:14 +01:00
Renovate Bot
41c06851a5 Update ASF-ui commit hash to 533e608 2022-02-08 03:51:33 +00:00
ArchiBot
4dbb964ba9 Automatic translations update 2022-02-08 02:09:13 +00:00
Renovate Bot
11471c759d Update ASF-ui commit hash to eaddc99 2022-02-07 23:44:16 +00:00
Renovate Bot
2aa4ab7fe8 Update ASF-ui commit hash to 114ff77 2022-02-07 04:53:06 +00:00
ArchiBot
dfc055c066 Automatic translations update 2022-02-07 02:08:26 +00:00
ArchiBot
1a0ac11f46 Automatic translations update 2022-02-06 02:17:05 +00:00
ArchiBot
7266864b3b Automatic translations update 2022-02-05 02:01:05 +00:00
Archi
b52f746138 Remove dead code 2022-02-04 14:47:13 +01:00
Archi
a2585ec8c9 Remove obsolete features 2022-02-04 14:46:09 +01:00
Renovate Bot
37781698e0 Update wiki commit hash to f917797 2022-02-04 10:06:13 +00:00
ArchiBot
2a8fe7611b Automatic translations update 2022-02-04 02:03:32 +00:00
Renovate Bot
8fdf14bb10 Update wiki commit hash to 15d73b5 2022-02-03 20:48:34 +00:00
Archi
31db72b2d6 Bump 2022-02-03 21:05:04 +01:00
Archi
f28ae15cc9 Bump 2022-02-03 19:55:01 +01:00
Archi
6fcc64dad1 Update RemoteCommunication.cs 2022-02-03 19:54:39 +01:00
Archi
e18046084e Remove TradeMatcher remote communication
Instead, make MatchActively work without specifying SteamTradeMatcher
2022-02-03 18:01:39 +01:00
Łukasz Domeradzki
c3c5f33289 Split global statistics into per-bot RemoteConnection (#2505)
* Split global statistics into per-bot RemoteConnection

* Add migration for existing statistics setting
2022-02-03 17:33:04 +01:00
Renovate Bot
e03734ef8f Update ASF-ui commit hash to e25e4c2 2022-02-03 02:08:27 +00:00
ArchiBot
a7c2ca6bc5 Automatic translations update 2022-02-03 02:06:56 +00:00
Renovate Bot
171fca42f2 Update ASF-ui commit hash to bb18713 2022-02-02 15:07:03 +00:00
Renovate Bot
e90ac74b16 Update ASF-ui commit hash to ad228aa 2022-02-02 03:41:32 +00:00
ArchiBot
a5ce8bf3d7 Automatic translations update 2022-02-02 02:08:44 +00:00
renovate[bot]
aad77569a7 Update dependency System.Linq.Async to v6 (#2504)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-02-01 20:11:23 +01:00
Renovate Bot
e74b3e4f78 Update docker/build-push-action action to v2.9.0 2022-02-01 12:23:46 +00:00
Renovate Bot
7db44c5835 Update ASF-ui commit hash to 68fb54f 2022-02-01 11:03:29 +00:00
ArchiBot
25a88f941d Automatic translations update 2022-02-01 02:15:13 +00:00
Renovate Bot
2eab00facc Update ASF-ui commit hash to ef8d48a 2022-01-31 21:41:04 +00:00
Renovate Bot
98e51a4543 Update ASF-ui commit hash to e205055 2022-01-31 14:21:42 +00:00
ArchiBot
2ee49db81d Automatic translations update 2022-01-31 02:07:28 +00:00
Renovate Bot
aab397dd2d Update wiki commit hash to a4368cd 2022-01-30 17:38:23 +00:00
Renovate Bot
7426fafcb0 Update ASF-ui commit hash to 837307f 2022-01-30 03:14:55 +00:00
ArchiBot
270bd7ae26 Automatic translations update 2022-01-30 02:08:13 +00:00
Renovate Bot
4c3713c19f Update wiki commit hash to ea00ec2 2022-01-29 23:48:59 +00:00
Renovate Bot
5791b1e552 Update dependency Humanizer to v2.14.1 2022-01-29 15:55:12 +00:00
Renovate Bot
5c59236a09 Update ASF-ui commit hash to 4f5ca7c 2022-01-29 01:17:20 +00:00
Renovate Bot
a7119bba89 Update ASF-ui commit hash to bb9711b 2022-01-28 15:21:16 +00:00
ArchiBot
3b64e14489 Automatic translations update 2022-01-27 02:08:44 +00:00
Renovate Bot
5f36ca91d7 Update ASF-ui commit hash to 652f1e9 2022-01-26 04:08:45 +00:00
ArchiBot
5a2cd25fa1 Automatic translations update 2022-01-26 02:13:04 +00:00
ArchiBot
20a5d509a7 Automatic translations update 2022-01-25 02:12:19 +00:00
Renovate Bot
0c457e7f3e Update wiki commit hash to 35d6943 2022-01-25 00:10:10 +00:00
Renovate Bot
4e6014d652 Update ASF-ui commit hash to 17f3ffb 2022-01-24 17:59:03 +00:00
Renovate Bot
1436fb6d6a Update ASF-ui commit hash to c8379bd 2022-01-24 13:25:22 +00:00
Renovate Bot
e2578c7960 Update dependency Markdig.Signed to v0.27.0 2022-01-23 16:41:54 +00:00
Archi
8fb1a2e1ea Bump 2022-01-23 14:31:20 +01:00
Archi
3e2951d1d0 Fix old IBotCommand plugin answers 2022-01-23 14:27:54 +01:00
Archi
1dcb103bf7 Bump 2022-01-23 13:01:41 +01:00
Archi
7ca8efb81f Fix steamID never being provided to original Response()
It matters in only one place anyway, but still.
2022-01-23 13:01:17 +01:00
Archi
c08f259806 Bump 2022-01-23 12:46:02 +01:00
ArchiBot
e0a8f96ec4 Automatic translations update 2022-01-23 02:07:51 +00:00
Archi
dae6f9d328 Use newer syntax for Enum.IsDefined() 2022-01-23 01:37:43 +01:00
Łukasz Domeradzki
4258fed873 Closes #2500 (#2501)
* Start work on #2500

* Update Bot.cs

* Misc refactor

* Update Bot.cs

* Add fallback for older plugins

* Misc

* Apply feedback
2022-01-23 00:14:14 +01:00
Renovate Bot
ab6e0a1e1b Update ASF-ui commit hash to 156992e 2022-01-22 18:51:14 +00:00
ArchiBot
959056523a Automatic translations update 2022-01-22 02:07:28 +00:00
Renovate Bot
245e3aa250 Update ASF-ui commit hash to 12ad1a4 2022-01-21 21:44:31 +00:00
Renovate Bot
170bd9fe42 Update ASF-ui commit hash to 1792331 2022-01-21 12:03:36 +00:00
Renovate Bot
2cf84d3691 Update ASF-ui commit hash to 351d4b7 2022-01-21 02:49:11 +00:00
ArchiBot
ae0ec5feee Automatic translations update 2022-01-21 02:09:07 +00:00
Renovate Bot
c495ad4f4a Update ASF-ui commit hash to 661a128 2022-01-20 20:44:19 +00:00
Renovate Bot
01e4085a52 Update ASF-ui commit hash to 2b2da73 2022-01-20 17:09:15 +00:00
ArchiBot
e89dad5792 Automatic translations update 2022-01-20 02:17:19 +00:00
Renovate Bot
8c6c7a5f3c Update ASF-ui commit hash to c985273 2022-01-19 21:20:37 +00:00
Renovate Bot
32f52e9de3 Update ASF-ui commit hash to 04a8efc 2022-01-19 03:26:14 +00:00
ArchiBot
aaabd81778 Automatic translations update 2022-01-19 02:07:42 +00:00
Renovate Bot
24200e3490 Update docker/build-push-action action to v2.8.0 2022-01-18 14:35:14 +00:00
Renovate Bot
a896075e88 Update ASF-ui commit hash to a3bc67f 2022-01-18 13:02:03 +00:00
ArchiBot
1bf35d1215 Automatic translations update 2022-01-18 02:15:40 +00:00
Renovate Bot
641aa435be Update wiki commit hash to ebfbf57 2022-01-17 20:37:03 +00:00
Renovate Bot
d3e48e69d4 Update ASF-ui commit hash to 1e5ccf7 2022-01-17 17:37:35 +00:00
Renovate Bot
8548044038 Update ASF-ui commit hash to 2c5aff8 2022-01-16 10:32:09 +00:00
ArchiBot
cdffde2d76 Automatic translations update 2022-01-16 02:16:57 +00:00
ArchiBot
afd7360676 Automatic translations update 2022-01-15 02:13:55 +00:00
Renovate Bot
7603efb289 Update ASF-ui commit hash to 94df465 2022-01-14 14:36:40 +00:00
Renovate Bot
3ad6f68bb9 Update crowdin/github-action action to v1.4.6 2022-01-14 10:25:23 +00:00
Renovate Bot
065facb5db Update ASF-ui commit hash to 6b2c2b6 2022-01-13 22:49:30 +00:00
Renovate Bot
8140784903 Update ASF-ui commit hash to 808b71f 2022-01-13 10:38:27 +00:00
Renovate Bot
c468f3e4e1 Update ASF-ui commit hash to 914506b 2022-01-13 01:34:43 +00:00
Renovate Bot
174317c674 Update ASF-ui commit hash to e48498f 2022-01-12 11:42:14 +00:00
ArchiBot
25690056da Automatic translations update 2022-01-12 09:33:03 +00:00
Renovate Bot
1950c1326e Update ASF-ui commit hash to 9301a40 2022-01-11 21:25:28 +00:00
Archi
876074a0ed Misc l10n 2022-01-11 12:27:05 +01:00
Renovate Bot
8c06051f52 Update ASF-ui commit hash to 6e8c8fd 2022-01-11 01:55:10 +00:00
Renovate Bot
b7d9c7b6da Update crowdin/github-action action to v1.4.5 2022-01-10 12:47:49 +00:00
Archi
ca048912cd Show ASF version in swagger spec
Also correct name to be more explicit
2022-01-10 12:49:05 +01:00
Archi
290aa3ba34 Bump 2022-01-10 11:21:50 +01:00
Archi
8620a90787 Remove all workarounds that should be no longer needed 2022-01-10 11:19:35 +01:00
Renovate Bot
189f998faf Update dependency SteamKit2 to v2.4.1 2022-01-10 03:06:39 +00:00
Archi
a5640f5a84 Fix permanently stopped IPC when ASF update has failed 2022-01-08 17:26:16 +01:00
Renovate Bot
b343d81f56 Update ASF-ui commit hash to 2089f03 2022-01-08 03:19:25 +00:00
Archi
edf2a19946 Add additional safeguards against running wrong package
e.g. Linux user calling dotnet ArchiSteamFarm.dll from win-x64 package
2022-01-07 19:08:40 +01:00
Archi
7e43a05517 Misc 2022-01-07 19:04:04 +01:00
Renovate Bot
db8ead92a1 Update ASF-ui commit hash to 44223fd 2022-01-07 05:34:52 +00:00
ArchiBot
e33c340183 Automatic translations update 2022-01-07 02:17:56 +00:00
Archi
a04781747e Bump 2022-01-06 20:48:26 +01:00
Archi
73bae63af6 Bullet-proofing 2022-01-06 20:44:17 +01:00
Archi
bf4bb7225c More Rider cleanups 2022-01-06 20:37:00 +01:00
Archi
1809028c77 Rider cleanup 2022-01-06 20:22:38 +01:00
Archi
c4b3899ae3 Bump 2022-01-06 20:18:56 +01:00
Archi
7c00e725d1 Closes #2483
I spent far too much time and sweat on this, so I'll just link this as explanation: https://github.com/SteamRE/SteamKit/pull/1075

HUGE THANKS to @xPaw for all the help, Pavel is the best
2022-01-06 20:01:03 +01:00
Renovate Bot
73dcb34c0c Update ASF-ui commit hash to 8b16b79 2022-01-06 05:47:57 +00:00
ArchiBot
65049bc2e5 Automatic translations update 2022-01-05 02:15:31 +00:00
Archi
b3ed87c9ef Add comment about built-in crypto miner
Got ya again
2022-01-04 21:25:30 +01:00
Renovate Bot
2ea5f5a83b Update ASF-ui commit hash to ca38e4f 2022-01-03 21:23:49 +00:00
Renovate Bot
ba1f832f54 Update ASF-ui commit hash to c25bd54 2022-01-03 04:34:01 +00:00
ArchiBot
39e7a73cd2 Automatic translations update 2022-01-03 02:13:56 +00:00
ArchiBot
d803887ef9 Automatic translations update 2022-01-02 02:15:55 +00:00
Renovate Bot
560d2400c0 Update ASF-ui commit hash to 61c51f7 2022-01-01 03:41:18 +00:00
ArchiBot
6a0cc973f3 Automatic translations update 2022-01-01 02:15:16 +00:00
Archi
b21742d06e Optimize selected GET calls that do not require session check preemptively
I've verified those to return login page and/or lostauth, we can save on excessive HEADs

It seems that all Steam GETs that return HTML are working like that, interesting
2021-12-31 16:55:29 +01:00
Archi
b76454ecfa Misc 2021-12-31 15:46:51 +01:00
Renovate Bot
376899ebe2 Update ASF-ui commit hash to 132d256 2021-12-31 10:13:56 +00:00
Renovate Bot
547bb13894 Update ASF-ui commit hash to 47d5a13 2021-12-31 03:09:34 +00:00
ArchiBot
c7792c8a1c Automatic translations update 2021-12-31 02:14:13 +00:00
ArchiBot
b67f92cc21 Automatic translations update 2021-12-30 02:12:38 +00:00
Renovate Bot
7ad05e1703 Update ASF-ui commit hash to 7006d2f 2021-12-29 23:32:37 +00:00
Archi
1ba2880071 Good catch 2021-12-28 23:50:02 +01:00
Archi
fd05a2cab6 Misc
I can imagine a very narrow edge case when waiting task would return just as the previous task releases the semaphore. This delay will prevent this from happening.
2021-12-28 23:44:12 +01:00
Archi
cd22d365ea Optimize HandleCallbacks() routine
We still need the semaphore to ensure we don't launch more than 1 task concurrently, but in unlikely case if we did, it'll just return on the initial call before the second one will finish, as we set KeepRunning = true before spawning a thread.

I don't see a reason why we'd need to enter semaphore on each loop, maybe I forgot about something, but it looks like Archi from the past just didn't notice that.
2021-12-28 18:16:34 +01:00
Renovate Bot
6196fc175e Update actions/setup-node action to v2.5.1 2021-12-28 15:13:10 +00:00
Renovate Bot
cd5835bdcb Update ASF-ui commit hash to 5dcfd68 2021-12-28 13:59:06 +00:00
Archi
07a7358493 Bump 2021-12-28 14:09:57 +01:00
Archi
475b8aa649 I lied 2021-12-28 14:09:38 +01:00
Archi
141c8835d0 Add error handling to inventory response on 5xx 2021-12-28 13:55:18 +01:00
Archi
6b498af3c9 Bump 2021-12-28 12:13:13 +01:00
Archi
640a794a3e Misc 2021-12-28 11:30:37 +01:00
ArchiBot
82cea76901 Automatic translations update 2021-12-28 02:12:56 +00:00
Archi
ffccb98d79 Fix NRE in WebLimitRequest()
This was possible if plugin triggered WebLimitRequest() for unrecognized service.
2021-12-27 16:03:33 +01:00
Renovate Bot
31bf21973b Update ASF-ui commit hash to e292b5e 2021-12-26 03:23:38 +00:00
ArchiBot
7dbb8e23b0 Automatic translations update 2021-12-26 02:15:27 +00:00
Renovate Bot
43d1ccfb0e Update ASF-ui commit hash to 40e8b05 2021-12-25 03:14:11 +00:00
ArchiBot
e2ff80cc46 Automatic translations update 2021-12-25 02:12:16 +00:00
ArchiBot
457bacfef8 Automatic translations update 2021-12-24 02:12:30 +00:00
Renovate Bot
44f9f12263 Update wiki commit hash to e16d2df 2021-12-23 17:14:24 +00:00
Renovate Bot
80c2091e34 Update ASF-ui commit hash to 4f7b927 2021-12-23 03:48:46 +00:00
Renovate Bot
9e522e7196 Update ASF-ui commit hash to 5149cd0 2021-12-22 20:23:20 +00:00
ArchiBot
335760c0bb Automatic translations update 2021-12-22 02:14:17 +00:00
Renovate Bot
e856ce8177 Update ASF-ui commit hash to 10a3ed9 2021-12-21 21:21:08 +00:00
Archi
16f02740d8 Handle AvatarHash NRE
https://github.com/SteamRE/SteamKit/pull/1067
2021-12-21 12:15:44 +01:00
Renovate Bot
7f5ada6dce Update ASF-ui commit hash to e11d32e 2021-12-21 04:35:34 +00:00
ArchiBot
65018efa7f Automatic translations update 2021-12-21 02:15:44 +00:00
Renovate Bot
3b87713fff Update wiki commit hash to 4f146ef 2021-12-20 18:30:39 +00:00
Archi
d141dce93d Bump 2021-12-20 18:41:29 +01:00
Archi
81a92d6781 Misc 2021-12-20 18:27:54 +01:00
Archi
f3d491611a Add MinFarmingDelayAfterBlock global config property 2021-12-20 18:10:46 +01:00
Renovate Bot
332d5d048c Update docker/login-action action to v1.12.0 2021-12-20 14:31:24 +00:00
Archi
11f8b6aae5 CI: Misc 2021-12-20 14:07:41 +01:00
Renovate Bot
6e5a02c380 Update docker/login-action action to v1.11.0 2021-12-20 11:35:12 +00:00
ArchiBot
22bbfe4e24 Automatic translations update 2021-12-20 02:13:57 +00:00
Archi
a2c278947d CI: Misc
| The command cannot remove the job because it does not exist or because it is a child job. Child jobs
     | can be removed only by removing the parent job.

I have no clue what is wrong with Windows and it's not critical anyway.
2021-12-18 17:50:45 +01:00
Renovate Bot
5db90e0eb8 Update ASF-ui commit hash to 99191bb 2021-12-18 02:44:55 +00:00
ArchiBot
1914f41ffe Automatic translations update 2021-12-18 02:14:18 +00:00
Renovate Bot
4754b3cbd9 Update crowdin/github-action action to v1.4.4 2021-12-17 16:59:06 +00:00
Renovate Bot
31acd4e7dc Update ASF-ui commit hash to 67c336f 2021-12-17 13:42:53 +00:00
Archi
f98d33bfa5 CI: Try to limit OOM on Windows 2021-12-17 14:09:55 +01:00
Archi
799b48d1b6 Revert "CI: Attemp to solve OOM on Windows"
This reverts commit 6444167ae4.
2021-12-17 14:09:25 +01:00
Archi
6444167ae4 CI: Attemp to solve OOM on Windows 2021-12-17 13:57:57 +01:00
Renovate Bot
543d03724d Update ASF-ui commit hash to 3c2bbaf 2021-12-17 04:13:06 +00:00
ArchiBot
cdd4ff9128 Automatic translations update 2021-12-17 02:30:16 +00:00
Renovate Bot
004c72127c Update ASF-ui commit hash to 78749d3 2021-12-16 16:41:36 +00:00
Archi
c08b2609fc Implement more precise time remaining for restricted accounts
It should be very close to reality now
2021-12-16 16:08:37 +01:00
Renovate Bot
eedb39e8df Update ASF-ui commit hash to 015b843 2021-12-16 02:59:12 +00:00
ArchiBot
379b9454ec Automatic translations update 2021-12-16 02:10:53 +00:00
Archi
02d0610a04 Final touches 2021-12-16 00:41:31 +01:00
Archi
f63723a157 Damn it 2021-12-16 00:38:38 +01:00
Archi
d59bccf1db Very important correction 2021-12-16 00:38:21 +01:00
Archi
2a734344bc Include examples of redacting in bug report 2021-12-16 00:35:36 +01:00
Archi
eb8946e480 Further update issue templates 2021-12-16 00:34:06 +01:00
Archi
55745c8093 Update issue templates 2021-12-16 00:18:03 +01:00
Archi
5a5a573e46 Bump 2021-12-15 20:41:41 +01:00
Archi
dc6968b371 Bump 2021-12-15 20:33:52 +01:00
Archi
692a0e0c9d Add Winter Sale 2021 to SalesBlacklist 2021-12-15 20:33:06 +01:00
Renovate Bot
c5839d3cbe Update actions/upload-artifact action to v2.3.1 2021-12-15 16:04:48 +00:00
Archi
bc3275fa9d Misc 2021-12-15 12:14:56 +01:00
ArchiBot
4c70a71072 Automatic translations update 2021-12-15 02:11:17 +00:00
Archi
fd2b9ff8d2 Update README.md 2021-12-15 00:00:10 +01:00
Archi
407b77428a Overkill 2021-12-14 23:58:57 +01:00
Archi
494dd69819 Update README.md 2021-12-14 23:58:30 +01:00
Archi
71f4e16603 Misc 2021-12-14 23:10:11 +01:00
Renovate Bot
1c0995426c Update ASF-ui commit hash to dbd7e04 2021-12-14 19:17:48 +00:00
Renovate Bot
82702647b4 Update dotnet monorepo to v3.1.22 2021-12-14 17:49:07 +00:00
Renovate Bot
b826a64f88 Update crowdin/github-action action to v1.4.3 2021-12-14 15:18:42 +00:00
Renovate Bot
d20c3257ed Update wiki commit hash to f2ed435 2021-12-14 13:55:50 +00:00
Renovate Bot
06622263c0 Update ASF-ui commit hash to c18c564 2021-12-14 03:24:07 +00:00
ArchiBot
73b3fe4c8a Automatic translations update 2021-12-14 02:13:18 +00:00
Archi
429b030021 Use alternative logic for public signing 2021-12-13 15:47:13 +01:00
ArchiBot
d60b932dfa Automatic translations update 2021-12-13 02:11:22 +00:00
Archi
5229f52f47 Use latest MSTest
Let's see if it finally works properly
2021-12-12 15:34:31 +01:00
ArchiBot
92a946c1cb Automatic translations update 2021-12-12 02:12:16 +00:00
Archi
03fc35dad0 Another try 2021-12-12 02:15:21 +01:00
Archi
225003c5d1 Try to fix netf, once again into the breach 2021-12-12 01:44:17 +01:00
Archi
4f598d5c8f Latest Rider cleanups 2021-12-12 01:12:54 +01:00
Archi
944df1cfc8 Decrease PICS refresh timer
We don't need to fetch info that often
2021-12-11 15:35:48 +01:00
Archi
e259f9e32f STD: Misc 2021-12-11 15:17:28 +01:00
Archi
c2cabfba49 STD: Add additional safeguards against depot keys corruption 2021-12-11 15:11:35 +01:00
Renovate Bot
dee8add183 Update ASF-ui commit hash to 45fe8ff 2021-12-11 02:47:31 +00:00
ArchiBot
06829beda4 Automatic translations update 2021-12-11 02:09:43 +00:00
Renovate Bot
2a35c82e0c Update ASF-ui commit hash to 28ad0e2 2021-12-10 19:28:45 +00:00
Renovate Bot
dbd8fa9877 Update ASF-ui commit hash to 43b3e47 2021-12-10 15:16:35 +00:00
Archi
d8a0d2f22d OCD 2021-12-10 15:00:59 +01:00
Archi
88996d1e35 Make ASF helper scripts aware of --service 2021-12-10 14:59:19 +01:00
Archi
78a88979dc Add service parameter to GET /Api/ASF 2021-12-10 14:22:49 +01:00
ArchiBot
2513bd4163 Automatic translations update 2021-12-10 02:09:39 +00:00
Archi
d9a5c30659 Closes #2472 2021-12-09 18:24:00 +01:00
ArchiBot
c60ea2ba3d Automatic translations update 2021-12-09 02:11:40 +00:00
Renovate Bot
7a07b6a22b Update crowdin/github-action action to v1.4.2 2021-12-08 22:08:30 +00:00
Renovate Bot
d89b6112dd Update ASF-ui commit hash to 3c31ac3 2021-12-08 20:47:55 +00:00
Archi
5d33bca611 Add IUpdateAware plugin interface 2021-12-08 19:48:59 +01:00
Renovate Bot
0f489f55e4 Update wiki commit hash to 9046b44 2021-12-08 16:41:15 +00:00
Archi
bf70f27449 Bump 2021-12-08 17:01:14 +01:00
Archi
0eab358af9 Plugins breaking: Convert all synchronous interface methods to Task
Okay, I wish we had uncovered it earlier as part of V5.2 but it has bitten us in the back just now, so I'm addressing it as part of monthly cycle instead.

Previously used void methods did not allow async operations in plugins in a "nice way". If plugin didn't require synchronization with the ASF and just minded its own business, it wasn't half bad as it could use async void signature. However, if plugin by any chance had to do something BEFORE ASF continued with the rest of the logic, it had to explicitly leave non-async void signature and call its async-capable stuff in synchronous manner (usually with Wait() or .Result), which is vastly suboptimal.

This was visible even in our STD plugin, which previously had (and still has) GlobalCache initialization in OnASFInit(). If that cache initialization took a bit longer time, STD would hit InvalidOperationException() in OnLicenseList() callback as global cache didn't load yet while we were already long past OnASFInit().

Therefore, I've decided to make a breaking change for a very good reason - all previous methods were converted to tasks, which allows from plugin to do one of three things:

- If plugin is async and requires synchronization (like STD), it can declare itself as async await, and do its awaits as-needed, and ASF will wait for those.
- If plugin is truly synchronous (and not just a synchronous signature with awful Wait() or .Result, see above), it can simply return Task.CompletedTask and has exactly the same logic.
- Finally, if plugin calls some async stuff but doesn't need ASF synchronization, it can "offload" itself from it by calling e.g. ASF's Utilities.InBackground() with whole logic, while returning Task.CompletedTask from the main method. This will allow it to effectively do what async void previously did, by just hooking into the process without intention of slowing it down.

All in all I'm confident this approach, while a bit counter-intuitive at first, will result in better compatibility between ASF and the plugins, as if I wanted to fix my STD issue right now without that breaking change, I'd have to actually call .Result on my async global cache loader function, which is utterly stupid if we can fix ASF to do the right thing instead.

This "approach" can be commonly found in some other libs with similar to ASF's event-hook behaviour, e.g. Discord.Net.

You'll sadly need to do some method signature changes in all of your plugins, as the core OnLoaded() was also changed. See the ones I did in SteamTokenDumperPlugin.cs if you need a practical example, and see ExamplePlugin.cs if you need further explanation.
2021-12-08 16:52:27 +01:00
Renovate Bot
3eae143c55 Update ASF-ui commit hash to aa650c8 2021-12-08 03:32:40 +00:00
ArchiBot
a33d46c85b Automatic translations update 2021-12-08 02:12:18 +00:00
Renovate Bot
4aa524f03e Update actions/upload-artifact action to v2.3.0 2021-12-08 00:01:56 +00:00
Renovate Bot
861e7ded16 Update actions/download-artifact action to v2.1.0 2021-12-07 21:18:02 +00:00
Archi
581d5167b9 Closes #2465 2021-12-07 21:34:46 +01:00
Archi
b9108742d4 Bump 2021-12-07 21:27:30 +01:00
Renovate Bot
86c19a2dce Update wiki commit hash to c8647e6 2021-12-07 13:54:40 +00:00
Renovate Bot
f64abc02ab Update ASF-ui commit hash to 9c9c415 2021-12-07 09:02:01 +00:00
Renovate Bot
d6e569c970 Update dependency System.Linq.Async to v5.1.0 2021-12-06 18:25:27 +00:00
Renovate Bot
a75d63cd7f Update ASF-ui commit hash to 09ad8a5 2021-12-06 17:01:23 +00:00
Renovate Bot
8bfc48d8dc Update ASF-ui commit hash to 468291f 2021-12-06 05:54:48 +00:00
ArchiBot
3de4069e3f Automatic translations update 2021-12-06 02:11:52 +00:00
Renovate Bot
874eb2d1c6 Update ASF-ui commit hash to 9a44864 2021-12-05 03:11:55 +00:00
ArchiBot
803d4554aa Automatic translations update 2021-12-05 02:14:37 +00:00
Renovate Bot
549ddb4271 Update dependency SteamKit2 to v2.4.0 2021-12-04 18:52:13 +00:00
renovate[bot]
9017c3970d Update dependency JustArchiNET.Madness to v3 (#2468)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-12-04 19:51:45 +01:00
Renovate Bot
1eecd8ace0 Update wiki commit hash to 758a267 2021-12-04 15:30:14 +00:00
Archi
31da584f75 Relax root warning
Even though the case is justified, we shouldn't render whole setups unsupported because of that, as running as root, while discouraged, does not directly affect the program stability.

This is especially true on Windows boxes where there is a lot of setups running with administrators by default and users are not even aware of that, I don't have a good fix for them (apart from reinstallation), and because I do not, I should not expect from them to supply cmd-line arg they don't even understand why.
2021-12-04 13:38:00 +01:00
Renovate Bot
1b1cdb8c3e Update ASF-ui commit hash to cff26d6 2021-12-04 10:33:11 +00:00
Renovate Bot
37e7f9f51c Update wiki commit hash to 835074b 2021-12-04 02:55:11 +00:00
ArchiBot
fc9dda13a0 Automatic translations update 2021-12-04 02:09:09 +00:00
Archi
94c214af96 Init emergency loggers to notify user about very early failures
"Very early failures" include exclusively lack of being able to navigate to given --path, as everything else is postponed until we get core loggers up and running. We should print the information to the user and abort the program at the minimum in this case.

Until now ASF silently ignored those errors and proceeded like usual, this is unwanted, if --path is wrong then it's on user to fix it.
2021-12-04 02:33:23 +01:00
Renovate Bot
a184fc555b Update wiki commit hash to 17b4272 2021-12-03 22:53:24 +00:00
Łukasz Domeradzki
ad2dae4faf Update RELEASE_TEMPLATE.md 2021-12-03 18:51:08 +01:00
Archi
aaf9cc67b3 Misc
60 days for lock-threads to ensure that issues and PRs get more or less a full month in stable release in case somebody would like to add something to them
2021-12-03 10:51:48 +01:00
ArchiBot
fe866554d6 Automatic translations update 2021-12-03 02:09:26 +00:00
Renovate Bot
97200da414 Update ASF-ui commit hash to 94a5e72 2021-12-02 15:44:18 +00:00
ArchiBot
876c332452 Automatic translations update 2021-12-01 02:13:09 +00:00
Renovate Bot
75bc0ed598 Update wiki commit hash to d204892 2021-11-30 10:00:20 +00:00
Renovate Bot
bcbc44cb1f Update ASF-ui commit hash to 2ec2c77 2021-11-30 07:53:18 +00:00
ArchiBot
db8b23031a Automatic translations update 2021-11-30 02:03:56 +00:00
Archi
586ad7c370 Madness 2.4.1 2021-11-30 00:29:21 +01:00
Archi
86867c8d99 Madness to the rescue! 2021-11-29 23:54:39 +01:00
Archi
6a824c2c6f Avoid verifying whether the special folder exists
We don't care at this stage, we'll fail when moving to given location
2021-11-29 23:43:19 +01:00
Archi
ac02495e80 Replace ~ in path with user's home location 2021-11-29 23:32:51 +01:00
Archi
67c5e1f7c4 Avoid creating www directory if it doesn't exist yet
Fixes nixOS packaging issues
2021-11-29 22:35:53 +01:00
Renovate Bot
85437774de Update ASF-ui commit hash to a04540b 2021-11-29 16:28:55 +00:00
Renovate Bot
8cb813a354 Update actions/setup-node action to v2.5.0 2021-11-29 11:37:54 +00:00
Archi
d64669d563 Closes #2459 2021-11-29 09:56:43 +01:00
ArchiBot
a049bf39d6 Automatic translations update 2021-11-29 02:09:15 +00:00
Renovate Bot
c191a85966 Update ASF-ui commit hash to 5fefa6b 2021-11-28 03:17:16 +00:00
ArchiBot
a5cd6314e4 Automatic translations update 2021-11-28 02:07:25 +00:00
Archi
90bf83cf48 Bump 2021-11-27 12:03:24 +01:00
266 changed files with 6083 additions and 4259 deletions

View File

@@ -6,6 +6,7 @@ root = true
[*]
charset = utf-8
#file_header_template = · _ _ _ ____ _ _____\n / \ _ __ ___ | |__ (_)/ ___| | |_ ___ __ _ _ __ ___ | ___|__ _ _ __ _ __ ___\n / _ \ | '__|/ __|| '_ \ | |\___ \ | __|/ _ \ / _` || '_ ` _ \ | |_ / _` || '__|| '_ ` _ \\n / ___ \ | | | (__ | | | || | ___) || |_| __/| (_| || | | | | || _|| (_| || | | | | | | |\n/_/ \_\|_| \___||_| |_||_||____/ \__|\___| \__,_||_| |_| |_||_| \__,_||_| |_| |_| |_|\n\nCopyright 2015-2021 Łukasz "JustArchi" Domeradzki\nContact: JustArchi@JustArchi.net\n\nLicensed under the Apache License, Version 2.0 (the "License")\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.
indent_style = tab
insert_final_newline = true
trim_trailing_whitespace = true

View File

@@ -67,7 +67,7 @@ ASF is open-source project, developed mainly by **[JustArchi](https://github.com
### License
ASF is using **[Apache License 2.0](https://github.com/JustArchiNET/ArchiSteamFarm/blob/main/LICENSE-2.0.txt)**.
ASF is using **[Apache License 2.0](https://github.com/JustArchiNET/ArchiSteamFarm/blob/main/LICENSE.txt)**.
> Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions.

2
.github/FUNDING.yml vendored
View File

@@ -2,4 +2,4 @@
github: JustArchi
patreon: JustArchi
custom: ["https://paypal.me/JustArchi", "https://pay.revolut.com/profile/ukaszyxm", "https://commerce.coinbase.com/checkout/0c23b844-c51b-45f4-9135-8db7c6fcf98e", "https://steamcommunity.com/tradeoffer/new/?partner=46697991&token=0ix2Ruv_"]
custom: ["https://paypal.me/JustArchi", "https://pay.revolut.com/justarchi", "https://commerce.coinbase.com/checkout/0c23b844-c51b-45f4-9135-8db7c6fcf98e", "https://steamcommunity.com/tradeoffer/new/?partner=46697991&token=0ix2Ruv_"]

View File

@@ -8,7 +8,7 @@ body:
label: Checklist
description: Ensure that our bug report form is appropriate for you.
options:
- label: I read and understood ASF's **[Contributing Guidelines](https://github.com/JustArchiNET/ArchiSteamFarm/blob/main/.github/CONTRIBUTING.md)**
- label: I read and understood ASF's **[Contributing guidelines](https://github.com/JustArchiNET/ArchiSteamFarm/blob/main/.github/CONTRIBUTING.md)**
required: true
- label: I also read **[Setting-up](https://github.com/JustArchiNET/ArchiSteamFarm/wiki/Setting-up)** and **[FAQ](https://github.com/JustArchiNET/ArchiSteamFarm/wiki/FAQ)**, I don't need **[help](https://github.com/JustArchiNET/ArchiSteamFarm/blob/main/.github/SUPPORT.md)**, this is a bug report
required: true
@@ -46,6 +46,7 @@ body:
- linux-arm
- linux-arm64
- linux-x64
- osx-arm64
- osx-x64
- win-x64
validations:
@@ -56,7 +57,7 @@ body:
label: Bug description
description: Short explanation of what you were going to do, what did you want to accomplish?
placeholder: |
I tried to brew a coffee with ASF using `PUT /Api/Coffee` ASF API, but upon trying the program returned HTTP error: 418 I'm a teapot
I tried to brew a coffee with ASF using `PUT /Api/Coffee` ASF API endpoint, but upon trying the program returned HTTP error: 418 I'm a teapot.
validations:
required: true
- type: textarea
@@ -74,27 +75,36 @@ body:
label: Actual behavior
description: What happened instead?
placeholder: |
No coffee was brewed, and so I was forced to use a water dispenser instead :/
No coffee was brewed, and so I was forced to use a water dispenser instead :/.
validations:
required: true
- type: textarea
id: steps-to-reproduce
attributes:
label: Steps to reproduce
description: Every command or action that happened after launching ASF, which leads to the bug.
placeholder: |
description: |
Every command or action that happened after launching ASF, which leads to the bug.
If launching ASF with provided configs (below) is everything that is needed, then this section is not mandatory.
placeholder: |
1. Put cup below the machine hosting ASF.
2. Send `PUT /Api/Coffee` request selecting latte macchiato.
3. No coffee was brewed.
- type: textarea
id: possible-solution
attributes:
label: Possible reason/solution
description: Not mandatory, but you can suggest a fix/reason for the bug, if known to you.
placeholder: If you observed something peculiar about your issue that could help us locate and fix the culprit, this is the right place.
description: |
Not mandatory, but you can suggest a fix/reason for the bug, if known to you.
If you observed something peculiar about your issue that could help us locate and fix the culprit, this is the right place.
placeholder: |
Perhaps no coffee was brewed because I was out of milk?
- type: dropdown
id: help
attributes:
label: Can you help us with this bug report?
description: ASF is offered for free and our resources are limited. Helping us increases the chance of fixing the problem.
description: |
ASF is offered for free and our resources are limited.
Helping us increases the chance of fixing the problem.
options:
- Yes, I can code the solution myself and send a pull request
- Somehow, I can test and offer feedback, but can't code
@@ -105,9 +115,24 @@ body:
id: asf-log
attributes:
label: Full log.txt recorded during reproducing the problem
description: You can find `log.txt` file directly in ASF directory. If the bug report doesn't come from the last run of the program, you can find logs from previous runs of the program in the `logs` directory instead.
description: |
You can find `log.txt` file directly in ASF directory.
If the bug report doesn't come from the last run of the program, you can find logs from previous runs of the program in the `logs` directory instead.
If no `log.txt` was recorded due to crash at the very early stage, console output should be pasted instead.
placeholder: |
If no log.txt was recorded due to crash at the very early stage, console output should be pasted instead.
2021-12-16 00:20:43|dotnet-282887|INFO|ASF|InitCore() ArchiSteamFarm V5.2.1.2 (generic/6b492ffa-9927-431d-bae7-7360ab9968a9 | .NET 6.0.0-rtm.21522.10; debian-arm64; Linux 5.15.0-1-arm64 #1 SMP Debian 5.15.3-1 (2021-11-18))
2021-12-16 00:20:43|dotnet-282887|INFO|ASF|InitCore() Copyright © 2015-2021 JustArchiNET
2021-12-16 00:20:47|dotnet-282887|INFO|ASF|InitPlugins() Initializing Plugins...
2021-12-16 00:20:47|dotnet-282887|INFO|ASF|InitPlugins() Loading SteamTokenDumperPlugin V5.2.1.2...
2021-12-16 00:20:47|dotnet-282887|INFO|ASF|InitPlugins() SteamTokenDumperPlugin has been loaded successfully!
2021-12-16 00:20:47|dotnet-282887|INFO|ASF|UpdateAndRestart() ASF will automatically check for new versions every 1 day.
2021-12-16 00:20:52|dotnet-282887|INFO|ASF|Update() Checking for new version...
2021-12-16 00:20:54|dotnet-282887|INFO|ASF|Update() Local version: 5.2.1.2 | Remote version: 5.2.1.2
2021-12-16 00:20:54|dotnet-282887|INFO|ASF|Load() Loading STD global cache...
2021-12-16 00:20:56|dotnet-282887|INFO|ASF|Load() Validating STD global cache integrity...
2021-12-16 00:20:56|dotnet-282887|INFO|ASF|OnASFInit() SteamTokenDumperPlugin has been initialized successfully, thank you in advance for your help. The first submission will happen in approximately 47 minutes from now.
2021-12-16 00:20:57|dotnet-282887|INFO|ASF|Start() Starting IPC server...
2021-12-16 00:20:59|dotnet-282887|INFO|ASF|Start() IPC server ready!
render: text
validations:
required: true
@@ -115,9 +140,9 @@ body:
id: global-config
attributes:
label: Global ASF.json config file
description: The config can be found in `config` directory under `ASF.json` name. You can leave this field empty if not using one.
placeholder: |
Paste the file content here, no need for triple backtick tags
description: |
The config can be found in `config` directory under `ASF.json` name.
You can leave this field empty if not using one.
Ensure that your config has redacted (but NOT removed) potentially-sensitive properties, such as:
- IPCPassword (recommended)
@@ -127,14 +152,22 @@ body:
- WebProxyUsername (optionally, if exposing private details)
Redacting involves replacing sensitive details, for example with stars (***). You should refrain from removing config lines entirely, as their pure existence may be relevant and should be preserved.
placeholder: |
{
"AutoRestart": false,
"Headless": true,
"IPCPassword": "********",
"UpdateChannel": 2,
"SteamTokenDumperPluginEnabled": true
}
render: json
- type: textarea
id: bot-config
attributes:
label: BotName.json config of all affected bot instances
description: Bot config files can be found in `config` directory, ending with `json` extension. You can leave this field empty if you don't have any defined.
placeholder: |
Paste the file content here, no need for triple backtick tags
description: |
Bot config files can be found in `config` directory, ending with `json` extension.
You can leave this field empty if you don't have any defined.
Ensure that your config has redacted (but NOT removed) potentially-sensitive properties, such as:
- SteamLogin (mandatory)
@@ -145,6 +178,12 @@ body:
- SteamUserPermissions (optionally, only SteamIDs)
Redacting involves replacing sensitive details, for example with stars (***). You should refrain from removing config lines entirely, as their pure existence may be relevant and should be preserved.
placeholder: |
{
"Enabled": true,
"SteamLogin": "********",
"SteamPassword": "********"
}
render: json
- type: textarea
id: additional-info

View File

@@ -8,7 +8,7 @@ body:
label: Checklist
description: Ensure that our enhancement idea form is appropriate for you.
options:
- label: I read and understood ASF's **[Contributing Guidelines](https://github.com/JustArchiNET/ArchiSteamFarm/blob/main/.github/CONTRIBUTING.md)**
- label: I read and understood ASF's **[Contributing guidelines](https://github.com/JustArchiNET/ArchiSteamFarm/blob/main/.github/CONTRIBUTING.md)**
required: true
- label: I also read **[Setting-up](https://github.com/JustArchiNET/ArchiSteamFarm/wiki/Setting-up)** and **[FAQ](https://github.com/JustArchiNET/ArchiSteamFarm/wiki/FAQ)**, I don't need **[help](https://github.com/JustArchiNET/ArchiSteamFarm/blob/main/.github/SUPPORT.md)**, this is an enhancement idea
required: true
@@ -26,8 +26,12 @@ body:
id: enhancement-purpose
attributes:
label: Enhancement purpose
description: Purpose of the enhancement - if it solves some problem, precise in particular which. If it benefits the program in some other way, precise in particular why.
placeholder: Present the underlying reason why this enhancement makes sense, and what is the context of it.
description: |
Purpose of the enhancement - if it solves some problem, precise in particular which. If it benefits the program in some other way, precise in particular why.
Present the underlying reason why this enhancement makes sense, and what is the context of it.
placeholder: |
As of today ASF offers variety of beverages, such as latte macchiato or cappuccino. I'd appreciate if ASF offered some no-milk options as well, for example espresso or ristretto.
I believe it'd further improve the program offering the users wider selection, which is very convenient.
validations:
required: true
- type: textarea
@@ -35,25 +39,30 @@ body:
attributes:
label: Solution
description: What would you like to see as a solution to the purpose specified by you above?
placeholder: What would work for you?
placeholder: |
Simply add an option to brew some no-milk types of coffee. The existing logic is fine, we just need wider choice!
validations:
required: true
- type: textarea
id: why-existing-not-sufficient
attributes:
label: Why currently available solutions are not sufficient?
description: Evaluate the existing solutions in regards to your requirements.
placeholder: |
description: |
Evaluate the existing solutions in regards to your requirements.
If something you're suggesting is already possible, then explain to us why the currently available solutions are not sufficient.
If it's not possible yet, then explain to us why it should be.
placeholder: |
I'm allergic to milk, there is currently no option to pick a beverage that doesn't include it.
Temporarily I'm switching cup mid-brewing as a workaround, but that is suboptimal considering the milk wasted.
validations:
required: true
- type: dropdown
id: help
attributes:
label: Can you help us with this enhancement idea?
description: ASF is offered for free and our resources are limited. Helping us increases the chance of making it happen.
description: |
ASF is offered for free and our resources are limited.
Helping us increases the chance of making it happen.
options:
- Yes, I can code the solution myself and send a pull request
- Somehow, I can test and offer feedback, but can't code

View File

@@ -8,7 +8,7 @@ body:
label: Checklist
description: Ensure that our wiki suggestion form is appropriate for you.
options:
- label: I read and understood ASF's **[Contributing Guidelines](https://github.com/JustArchiNET/ArchiSteamFarm/blob/main/.github/CONTRIBUTING.md)**
- label: I read and understood ASF's **[Contributing guidelines](https://github.com/JustArchiNET/ArchiSteamFarm/blob/main/.github/CONTRIBUTING.md)**
required: true
- label: I also read **[Setting-up](https://github.com/JustArchiNET/ArchiSteamFarm/wiki/Setting-up)** and **[FAQ](https://github.com/JustArchiNET/ArchiSteamFarm/wiki/FAQ)**, I don't need **[help](https://github.com/JustArchiNET/ArchiSteamFarm/blob/main/.github/SUPPORT.md)**, this is a wiki suggestion
required: true
@@ -20,7 +20,9 @@ body:
id: wiki-page
attributes:
label: Wiki page
description: If this is a suggestion regarding an existing wiki page, please link it for reference. If the wiki page doesn't exist, suggest its title.
description: |
If this is a suggestion regarding an existing wiki page, please link it for reference.
If the wiki page doesn't exist, suggest its title.
placeholder: https://github.com/JustArchiNET/ArchiSteamFarm/wiki/???
validations:
required: true
@@ -28,26 +30,32 @@ body:
id: issue
attributes:
label: The issue
description: Please specify your issue in regards to our wiki documentation.
placeholder: |
description: |
Please specify your issue in regards to our wiki documentation.
If you're reporting a mistake/correction, state what is wrong.
If you're suggesting an idea, explain the details.
placeholder: |
As of today the wiki doesn't explain how to sing famous song composed by Rick Astley - Never Gonna Give You Up.
I'm sick of googling the lyrics every time I'm opening a complaint on your GitHub, so please consider just adding it along the other stuff.
validations:
required: true
- type: textarea
id: wrong-text
attributes:
label: Wrong text
description: The existing text on the wiki which you classify as wrong.
placeholder: |
description: |
The existing text on the wiki which you classify as wrong.
If you're suggesting a new page, paragraph or other addition to the wiki, then this section is not mandatory.
placeholder: |
Lack of song lyrics is what's wrong!
render: markdown
- type: textarea
id: suggested-improvement
attributes:
label: Suggested improvement
description: The new or corrected text that would satisfy your issue stated above. You may use **[markdown](https://guides.github.com/features/mastering-markdown)** for formatting.
description: |
The new or corrected text that would satisfy your issue stated above.
You may use **[markdown](https://guides.github.com/features/mastering-markdown)** for formatting.
placeholder: |
# Never Gonna Give You Up by Rick Astley

View File

@@ -1,6 +1,6 @@
### Notice
**Pre-releases are experimental versions that often contain unpatched bugs, work-in-progress features or rewritten implementations. If you don't consider yourself advanced user, please download **[latest stable release](https://github.com/JustArchiNET/ArchiSteamFarm/releases/latest)** instead. Pre-release versions are dedicated to users who know how to report bugs, deal with issues and give feedback - no technical support will be given. Check out ASF **[release cycle](https://github.com/JustArchiNET/ArchiSteamFarm/wiki/Release-cycle)** if you'd like to learn more.**
**Pre-releases are experimental versions that often contain unpatched bugs, work-in-progress features and rewritten implementations. If you don't consider yourself advanced user, please download **[latest stable release](https://github.com/JustArchiNET/ArchiSteamFarm/releases/latest)** instead. Pre-release versions are dedicated to users who know how to report bugs, deal with issues and give feedback - no technical support will be given. Check out ASF **[release cycle](https://github.com/JustArchiNET/ArchiSteamFarm/wiki/Release-cycle)** if you'd like to learn more.**
---
@@ -12,6 +12,6 @@ This is automated GitHub deployment, human-readable changelog should be availabl
### Support
ASF is available for free, this release was made possible thanks to the people that decided to support the project. If you're grateful for what we're doing, please consider donating. Developing ASF requires massive amount of time and knowledge, especially when it comes to Steam (and its problems). Even $1 is highly appreciated and shows that you care. Thank you!
ASF is available for free, this release was made possible thanks to the people that decided to support the project. If you're grateful for what we're doing, please consider a donation. Developing ASF requires massive amount of time and knowledge, especially when it comes to Steam (and its problems). Even $1 is highly appreciated and shows that you care. Thank you!
[![GitHub sponsor](https://img.shields.io/badge/GitHub-sponsor-ea4aaa.svg?logo=github-sponsors)](https://github.com/sponsors/JustArchi) [![Patreon support](https://img.shields.io/badge/Patreon-support-f96854.svg?logo=patreon)](https://www.patreon.com/JustArchi) [![Crypto donate](https://img.shields.io/badge/Crypto-donate-f7931a.svg?logo=bitcoin)](https://commerce.coinbase.com/checkout/0c23b844-c51b-45f4-9135-8db7c6fcf98e) [![PayPal.me donate](https://img.shields.io/badge/PayPal.me-donate-00457c.svg?logo=paypal)](https://paypal.me/JustArchi) [![PayPal donate](https://img.shields.io/badge/PayPal-donate-00457c.svg?logo=paypal)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=HD2P2P3WGS5Y4) [![Revolut donate](https://img.shields.io/badge/Revolut-donate-0075eb.svg?logo=revolut)](https://pay.revolut.com/profile/ukaszyxm) [![Steam donate](https://img.shields.io/badge/Steam-donate-000000.svg?logo=steam)](https://steamcommunity.com/tradeoffer/new/?partner=46697991&token=0ix2Ruv_)
[![GitHub sponsor](https://img.shields.io/badge/GitHub-sponsor-ea4aaa.svg?logo=github-sponsors)](https://github.com/sponsors/JustArchi) [![Patreon support](https://img.shields.io/badge/Patreon-support-f96854.svg?logo=patreon)](https://www.patreon.com/JustArchi) [![Crypto donate](https://img.shields.io/badge/Crypto-donate-f7931a.svg?logo=bitcoin)](https://commerce.coinbase.com/checkout/0c23b844-c51b-45f4-9135-8db7c6fcf98e) [![PayPal.me donate](https://img.shields.io/badge/PayPal.me-donate-00457c.svg?logo=paypal)](https://paypal.me/JustArchi) [![PayPal donate](https://img.shields.io/badge/PayPal-donate-00457c.svg?logo=paypal)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=HD2P2P3WGS5Y4) [![Revolut donate](https://img.shields.io/badge/Revolut-donate-0075eb.svg?logo=revolut)](https://pay.revolut.com/justarchi) [![Steam donate](https://img.shields.io/badge/Steam-donate-000000.svg?logo=steam)](https://steamcommunity.com/tradeoffer/new/?partner=46697991&token=0ix2Ruv_)

11
.github/crowdin.yml vendored
View File

@@ -1,3 +1,4 @@
"base_path": ".."
"preserve_hierarchy": true
"files": [
{
@@ -5,7 +6,10 @@
"translation": "/ArchiSteamFarm/Localization/Strings.%locale%.resx",
"translation_replace": {
".lol-US.resx": ".qps-Ploc.resx",
".sr-CS.resx": ".sr-Latn.resx"
".sr-CS.resx": ".sr-Latn.resx",
".zh-CN.resx": ".zh-Hans.resx",
".zh-HK.resx": ".zh-Hant-HK.resx",
".zh-TW.resx": ".zh-Hant.resx"
}
},
{
@@ -13,7 +17,10 @@
"translation": "/ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/Localization/Strings.%locale%.resx",
"translation_replace": {
".lol-US.resx": ".qps-Ploc.resx",
".sr-CS.resx": ".sr-Latn.resx"
".sr-CS.resx": ".sr-Latn.resx",
".zh-CN.resx": ".zh-Hans.resx",
".zh-HK.resx": ".zh-Hant-HK.resx",
".zh-TW.resx": ".zh-Hant.resx"
}
},
{

View File

@@ -17,13 +17,14 @@
{
// TODO: <= 3.1 for Mono support, last failed version 6.12, https://steamcommunity.com/groups/archiasf/discussions/1/2997673517556002529
"allowedVersions": "<= 3.1",
"matchManagers": [ "nuget" ],
"matchPackageNames": [ "Microsoft.Extensions.Configuration.Json", "Microsoft.Extensions.Logging.Configuration" ]
},
{
// TODO: <= 2.2.4 due to https://github.com/microsoft/testfx/issues/906, should be resolved with v2.2.8+ (?)
"allowedVersions": "<= 2.2.4",
"groupName": "MSTest packages",
"matchPackagePatterns": ["^MSTest\\..+"]
// TODO: https://github.com/AngleSharp/AngleSharp.XPath/issues/36
"allowedVersions": "< 2.0",
"matchManagers": [ "nuget" ],
"matchPackageNames": [ "AngleSharp.XPath" ]
}
]
}

View File

@@ -19,12 +19,12 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v2.4.0
uses: actions/checkout@v3.0.2
with:
submodules: recursive
- name: Setup .NET Core
uses: actions/setup-dotnet@v1.9.0
uses: actions/setup-dotnet@v2.1.0
with:
dotnet-version: ${{ env.DOTNET_SDK_VERSION }}
@@ -38,9 +38,8 @@ jobs:
run: dotnet test ArchiSteamFarm.Tests -c "${{ matrix.configuration }}" -p:ContinuousIntegrationBuild=true -p:UseAppHost=false --nologo
- name: Upload latest strings for translation on Crowdin
continue-on-error: true
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' && matrix.configuration == 'Release' && startsWith(matrix.os, 'ubuntu-') }}
uses: crowdin/github-action@1.4.1
uses: crowdin/github-action@1.4.9
with:
crowdin_branch_name: main
config: '.github/crowdin.yml'

View File

@@ -17,15 +17,15 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v2.4.0
uses: actions/checkout@v3.0.2
with:
submodules: recursive
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1.6.0
uses: docker/setup-buildx-action@v2.0.0
- name: Build ${{ matrix.configuration }} Docker image from ${{ matrix.file }}
uses: docker/build-push-action@v2.7.0
uses: docker/build-push-action@v3.0.0
with:
context: .
file: ${{ matrix.file }}

View File

@@ -15,22 +15,22 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v2.4.0
uses: actions/checkout@v3.0.2
with:
submodules: recursive
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1.6.0
uses: docker/setup-buildx-action@v2.0.0
- name: Login to ghcr.io
uses: docker/login-action@v1.10.0
uses: docker/login-action@v2.0.0
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Login to DockerHub
uses: docker/login-action@v1.10.0
uses: docker/login-action@v2.0.0
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
@@ -55,7 +55,7 @@ jobs:
echo "DH_REPOSITORY=$(echo ${{ secrets.DOCKERHUB_USERNAME }}/${{ github.event.repository.name }} | tr '[:upper:]' '[:lower:]')" >> "$GITHUB_ENV"
- name: Build and publish Docker image from Dockerfile.Service
uses: docker/build-push-action@v2.7.0
uses: docker/build-push-action@v3.0.0
with:
context: .
file: Dockerfile.Service

View File

@@ -16,22 +16,22 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v2.4.0
uses: actions/checkout@v3.0.2
with:
submodules: recursive
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1.6.0
uses: docker/setup-buildx-action@v2.0.0
- name: Login to ghcr.io
uses: docker/login-action@v1.10.0
uses: docker/login-action@v2.0.0
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Login to DockerHub
uses: docker/login-action@v1.10.0
uses: docker/login-action@v2.0.0
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
@@ -55,7 +55,7 @@ jobs:
echo "DH_REPOSITORY=$(echo ${{ secrets.DOCKERHUB_USERNAME }}/${{ github.event.repository.name }} | tr '[:upper:]' '[:lower:]')" >> "$GITHUB_ENV"
- name: Build and publish Docker image from Dockerfile
uses: docker/build-push-action@v2.7.0
uses: docker/build-push-action@v3.0.0
with:
context: .
platforms: ${{ env.PLATFORMS }}
@@ -70,8 +70,7 @@ jobs:
push: true
- name: Update DockerHub repository description
continue-on-error: true
uses: peter-evans/dockerhub-description@v2.4.3
uses: peter-evans/dockerhub-description@v3.0.0
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}

View File

@@ -16,22 +16,22 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v2.4.0
uses: actions/checkout@v3.0.2
with:
submodules: recursive
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1.6.0
uses: docker/setup-buildx-action@v2.0.0
- name: Login to ghcr.io
uses: docker/login-action@v1.10.0
uses: docker/login-action@v2.0.0
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Login to DockerHub
uses: docker/login-action@v1.10.0
uses: docker/login-action@v2.0.0
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
@@ -56,7 +56,7 @@ jobs:
echo "DH_REPOSITORY=$(echo ${{ secrets.DOCKERHUB_USERNAME }}/${{ github.event.repository.name }} | tr '[:upper:]' '[:lower:]')" >> "$GITHUB_ENV"
- name: Build and publish Docker image from Dockerfile
uses: docker/build-push-action@v2.7.0
uses: docker/build-push-action@v3.0.0
with:
context: .
platforms: ${{ env.PLATFORMS }}

View File

@@ -11,5 +11,5 @@ jobs:
- name: Lock inactive threads
uses: dessant/lock-threads@v3.0.0
with:
issue-inactive-days: 30
pr-inactive-days: 30
issue-inactive-days: 60
pr-inactive-days: 60

View File

@@ -25,12 +25,12 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v2.4.0
uses: actions/checkout@v3.0.2
with:
submodules: recursive
- name: Setup .NET Core
uses: actions/setup-dotnet@v1.9.0
uses: actions/setup-dotnet@v2.1.0
with:
dotnet-version: ${{ env.DOTNET_SDK_VERSION }}
@@ -38,7 +38,7 @@ jobs:
run: dotnet --info
- name: Setup Node.js with npm
uses: actions/setup-node@v2.4.1
uses: actions/setup-node@v3.3.0
with:
check-latest: true
node-version: ${{ env.NODE_JS_VERSION }}
@@ -177,7 +177,7 @@ jobs:
# Create the final zip file
case "$(uname -s)" in
"Darwin")
# We prefer to use zip on OS X as 7z implementation on that OS doesn't handle file permissions (chmod +x)
# We prefer to use zip on macOS as 7z implementation on that OS doesn't handle file permissions (chmod +x)
if command -v zip >/dev/null; then
(
cd "${GITHUB_WORKSPACE}/out/${1}"
@@ -325,63 +325,64 @@ jobs:
foreach ($variant in $env:VARIANTS.Split([char[]] $null, [System.StringSplitOptions]::RemoveEmptyEntries)) {
Start-Job -Name "$variant" $PublishBlock -ArgumentList "$variant"
# Limit active jobs in parallel to help with memory usage
$jobs = $(Get-Job -State Running)
while (@($jobs).Count -ge 5) {
Wait-Job -Job $jobs -Any | Out-Null
$jobs = $(Get-Job -State Running)
}
}
Get-Job | Receive-Job -Wait
- name: Upload ASF-generic
continue-on-error: true
uses: actions/upload-artifact@v2.2.4
uses: actions/upload-artifact@v3.1.0
with:
name: ${{ matrix.os }}_ASF-generic
path: out/ASF-generic.zip
- name: Upload ASF-generic-netf
continue-on-error: true
if: startsWith(matrix.os, 'windows-')
uses: actions/upload-artifact@v2.2.4
uses: actions/upload-artifact@v3.1.0
with:
name: ${{ matrix.os }}_ASF-generic-netf
path: out/ASF-generic-netf.zip
- name: Upload ASF-linux-arm
continue-on-error: true
uses: actions/upload-artifact@v2.2.4
uses: actions/upload-artifact@v3.1.0
with:
name: ${{ matrix.os }}_ASF-linux-arm
path: out/ASF-linux-arm.zip
- name: Upload ASF-linux-arm64
continue-on-error: true
uses: actions/upload-artifact@v2.2.4
uses: actions/upload-artifact@v3.1.0
with:
name: ${{ matrix.os }}_ASF-linux-arm64
path: out/ASF-linux-arm64.zip
- name: Upload ASF-linux-x64
continue-on-error: true
uses: actions/upload-artifact@v2.2.4
uses: actions/upload-artifact@v3.1.0
with:
name: ${{ matrix.os }}_ASF-linux-x64
path: out/ASF-linux-x64.zip
- name: Upload ASF-osx-arm64
continue-on-error: true
uses: actions/upload-artifact@v2.2.4
uses: actions/upload-artifact@v3.1.0
with:
name: ${{ matrix.os }}_ASF-osx-arm64
path: out/ASF-osx-arm64.zip
- name: Upload ASF-osx-x64
continue-on-error: true
uses: actions/upload-artifact@v2.2.4
uses: actions/upload-artifact@v3.1.0
with:
name: ${{ matrix.os }}_ASF-osx-x64
path: out/ASF-osx-x64.zip
- name: Upload ASF-win-x64
continue-on-error: true
uses: actions/upload-artifact@v2.2.4
uses: actions/upload-artifact@v3.1.0
with:
name: ${{ matrix.os }}_ASF-win-x64
path: out/ASF-win-x64.zip
@@ -393,61 +394,61 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v2.4.0
uses: actions/checkout@v3.0.2
# TODO: It'd be perfect if we could match final artifacts to the platform they target, so e.g. linux build comes from the linux machine
# However, that is currently impossible due to https://github.com/dotnet/msbuild/issues/3897
# Therefore, we'll (sadly) pull artifacts from Windows machine only for now
- name: Download ASF-generic artifact from windows-latest
uses: actions/download-artifact@v2.0.10
uses: actions/download-artifact@v3.0.0
with:
name: windows-latest_ASF-generic
path: out
- name: Download ASF-generic-netf artifact from windows-latest
uses: actions/download-artifact@v2.0.10
uses: actions/download-artifact@v3.0.0
with:
name: windows-latest_ASF-generic-netf
path: out
- name: Download ASF-linux-arm artifact from windows-latest
uses: actions/download-artifact@v2.0.10
uses: actions/download-artifact@v3.0.0
with:
name: windows-latest_ASF-linux-arm
path: out
- name: Download ASF-linux-arm64 artifact from windows-latest
uses: actions/download-artifact@v2.0.10
uses: actions/download-artifact@v3.0.0
with:
name: windows-latest_ASF-linux-arm64
path: out
- name: Download ASF-linux-x64 artifact from windows-latest
uses: actions/download-artifact@v2.0.10
uses: actions/download-artifact@v3.0.0
with:
name: windows-latest_ASF-linux-x64
path: out
- name: Download ASF-osx-arm64 artifact from windows-latest
uses: actions/download-artifact@v2.0.10
uses: actions/download-artifact@v3.0.0
with:
name: windows-latest_ASF-osx-arm64
path: out
- name: Download ASF-osx-x64 artifact from windows-latest
uses: actions/download-artifact@v2.0.10
uses: actions/download-artifact@v3.0.0
with:
name: windows-latest_ASF-osx-x64
path: out
- name: Download ASF-win-x64 artifact from windows-latest
uses: actions/download-artifact@v2.0.10
uses: actions/download-artifact@v3.0.0
with:
name: windows-latest_ASF-win-x64
path: out
- name: Import GPG key for signing
uses: crazy-max/ghaction-import-gpg@v4.1.0
uses: crazy-max/ghaction-import-gpg@v5.0.0
with:
gpg_private_key: ${{ secrets.ARCHIBOT_GPG_PRIVATE_KEY }}
@@ -464,15 +465,13 @@ jobs:
)
- name: Upload SHA512SUMS
continue-on-error: true
uses: actions/upload-artifact@v2.2.4
uses: actions/upload-artifact@v3.1.0
with:
name: SHA512SUMS
path: out/SHA512SUMS
- name: Upload SHA512SUMS.sign
continue-on-error: true
uses: actions/upload-artifact@v2.2.4
uses: actions/upload-artifact@v3.1.0
with:
name: SHA512SUMS.sign
path: out/SHA512SUMS.sign

View File

@@ -10,7 +10,7 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v2.4.0
uses: actions/checkout@v3.0.2
with:
submodules: recursive
token: ${{ secrets.ARCHIBOT_GITHUB_TOKEN }}
@@ -26,7 +26,7 @@ jobs:
git reset --hard origin/master
- name: Download latest translations from Crowdin
uses: crowdin/github-action@1.4.1
uses: crowdin/github-action@1.4.9
with:
upload_sources: false
download_translations: true
@@ -38,7 +38,7 @@ jobs:
token: ${{ secrets.ASF_CROWDIN_API_TOKEN }}
- name: Import GPG key for signing
uses: crazy-max/ghaction-import-gpg@v4.1.0
uses: crazy-max/ghaction-import-gpg@v5.0.0
with:
gpg_private_key: ${{ secrets.ARCHIBOT_GPG_PRIVATE_KEY }}
git_config_global: true

35
.gitignore vendored
View File

@@ -18,13 +18,16 @@ ArchiSteamFarm/logs
# Ignore standard out folders for publishing
**/out
# JetBrains Rider
.idea/
# _ _
# | | (_) _ __ _ _ __ __
# | | | || '_ \ | | | |\ \/ /
# | |___ | || | | || |_| | > <
# |_____||_||_| |_| \__,_|/_/\_\
#
# https://github.com/github/gitignore/blob/master/Global/Linux.gitignore
# https://github.com/github/gitignore/blob/main/Global/Linux.gitignore
# 4f7062e132d7f88e68ab737e64fef872bd3a491f
*~
@@ -47,7 +50,7 @@ ArchiSteamFarm/logs
# | | | | | || (_| || (__ | |_| | ___) |
# |_| |_| |_| \__,_| \___| \___/ |____/
#
# https://github.com/github/gitignore/blob/master/Global/macOS.gitignore
# https://github.com/github/gitignore/blob/main/Global/macOS.gitignore
# 2bb963b16a1957c865335e53537036c2e97399b5
# General
@@ -84,7 +87,7 @@ Temporary Items
# |_| |_| \___/ |_| |_| \___/ |____/ \___| \_/ \___||_| \___/ | .__/
# |_|
#
# https://github.com/github/gitignore/blob/master/Global/MonoDevelop.gitignore
# https://github.com/github/gitignore/blob/main/Global/MonoDevelop.gitignore
# e8b2e1a9cc7c9ca49bb05c20a4c4491b85feba6d
#User Specific
@@ -102,13 +105,13 @@ test-results/
# \ V / | |\__ \| |_| || (_| || | ___) || |_ | |_| || (_| || || (_) |
# \_/ |_||___/ \__,_| \__,_||_||____/ \__| \__,_| \__,_||_| \___/
#
# https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
# 888439ee893d0097862f1d510585bd0e3cfd500f
# https://github.com/github/gitignore/blob/main/VisualStudio.gitignore
# 491040e88a572d300a59484cb78c86c5e944b70a
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
##
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore
# User-specific files
*.rsuser
@@ -313,9 +316,6 @@ PublishScripts/
*.nuget.props
*.nuget.targets
# Nuget personal access tokens and Credentials
nuget.config
# Microsoft Azure Build Output
csx/
*.build.csdef
@@ -404,6 +404,17 @@ node_modules/
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
*.vbw
# Visual Studio 6 auto-generated project file (contains which files were open etc.)
*.vbp
# Visual Studio 6 workspace and project file (working project files containing files to include in project)
*.dsw
*.dsp
# Visual Studio 6 technical files
*.ncb
*.aps
# Visual Studio LightSwitch build output
**/*.HTMLClient/GeneratedArtifacts
**/*.DesktopClient/GeneratedArtifacts
@@ -460,6 +471,9 @@ ASALocalRun/
# Local History for Visual Studio
.localhistory/
# Visual Studio History (VSHistory) files
.vshistory/
# BeatPulse healthcheck temp database
healthchecksdb
@@ -491,7 +505,6 @@ FodyWeavers.xsd
*.msp
# JetBrains Rider
.idea/
*.sln.iml
# __ __ _ _
@@ -500,7 +513,7 @@ FodyWeavers.xsd
# \ V V / | || | | || (_| || (_) |\ V V / \__ \
# \_/\_/ |_||_| |_| \__,_| \___/ \_/\_/ |___/
#
# https://github.com/github/gitignore/blob/master/Global/Windows.gitignore
# https://github.com/github/gitignore/blob/main/Global/Windows.gitignore
# 5808b77453dec299d4daf8557b05a80be832a5b8
# Windows thumbnail cache files

2
ASF-ui

Submodule ASF-ui updated: 88f7324e09...574bfd6ffc

View File

@@ -5,6 +5,7 @@
<ItemGroup>
<PackageReference Include="ConfigureAwaitChecker.Analyzer" PrivateAssets="all" />
<PackageReference Include="JetBrains.Annotations" PrivateAssets="all" />
<PackageReference Include="Newtonsoft.Json" IncludeAssets="compile" />
<PackageReference Include="SteamKit2" IncludeAssets="compile" />
<PackageReference Include="System.Composition.AttributedModel" IncludeAssets="compile" />

View File

@@ -4,7 +4,7 @@
// / ___ \ | | | (__ | | | || | ___) || |_| __/| (_| || | | | | || _|| (_| || | | | | | | |
// /_/ \_\|_| \___||_| |_||_||____/ \__|\___| \__,_||_| |_| |_||_| \__,_||_| |_| |_| |_|
// |
// Copyright 2015-2021 Łukasz "JustArchi" Domeradzki
// Copyright 2015-2022 Łukasz "JustArchi" Domeradzki
// Contact: JustArchi@JustArchi.net
// |
// Licensed under the Apache License, Version 2.0 (the "License");

View File

@@ -4,7 +4,7 @@
// / ___ \ | | | (__ | | | || | ___) || |_| __/| (_| || | | | | || _|| (_| || | | | | | | |
// /_/ \_\|_| \___||_| |_||_||____/ \__|\___| \__,_||_| |_| |_||_| \__,_||_| |_| |_| |_|
// |
// Copyright 2015-2021 Łukasz "JustArchi" Domeradzki
// Copyright 2015-2022 Łukasz "JustArchi" Domeradzki
// Contact: JustArchi@JustArchi.net
// |
// Licensed under the Apache License, Version 2.0 (the "License");
@@ -35,15 +35,13 @@ internal static class CatAPI {
private const string URL = "https://aws.random.cat";
internal static async Task<string?> GetRandomCatURL(WebBrowser webBrowser) {
if (webBrowser == null) {
throw new ArgumentNullException(nameof(webBrowser));
}
ArgumentNullException.ThrowIfNull(webBrowser);
Uri request = new($"{URL}/meow");
ObjectResponse<MeowResponse>? response = await webBrowser.UrlGetToJsonObject<MeowResponse>(request).ConfigureAwait(false);
if (response == null) {
if (response?.Content == null) {
return null;
}
@@ -57,7 +55,7 @@ internal static class CatAPI {
#pragma warning disable CA1812 // False positive, the class is used during json deserialization
[SuppressMessage("ReSharper", "ClassCannotBeInstantiated")]
private sealed class MeowResponse {
[JsonProperty(PropertyName = "file", Required = Required.Always)]
[JsonProperty("file", Required = Required.Always)]
internal readonly string Link = "";
[JsonConstructor]

View File

@@ -4,7 +4,7 @@
// / ___ \ | | | (__ | | | || | ___) || |_| __/| (_| || | | | | || _|| (_| || | | | | | | |
// /_/ \_\|_| \___||_| |_||_||____/ \__|\___| \__,_||_| |_| |_||_| \__,_||_| |_| |_| |_|
// |
// Copyright 2015-2021 Łukasz "JustArchi" Domeradzki
// Copyright 2015-2022 Łukasz "JustArchi" Domeradzki
// Contact: JustArchi@JustArchi.net
// |
// Licensed under the Apache License, Version 2.0 (the "License");

View File

@@ -4,7 +4,7 @@
// / ___ \ | | | (__ | | | || | ___) || |_| __/| (_| || | | | | || _|| (_| || | | | | | | |
// /_/ \_\|_| \___||_| |_||_||____/ \__|\___| \__,_||_| |_| |_||_| \__,_||_| |_| |_| |_|
// |
// Copyright 2015-2021 Łukasz "JustArchi" Domeradzki
// Copyright 2015-2022 Łukasz "JustArchi" Domeradzki
// Contact: JustArchi@JustArchi.net
// |
// Licensed under the Apache License, Version 2.0 (the "License");
@@ -28,7 +28,6 @@ using ArchiSteamFarm.Core;
using ArchiSteamFarm.Plugins.Interfaces;
using ArchiSteamFarm.Steam;
using ArchiSteamFarm.Steam.Data;
using ArchiSteamFarm.Steam.Storage;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using SteamKit2;
@@ -41,7 +40,7 @@ namespace ArchiSteamFarm.CustomPlugins.ExamplePlugin;
// Your plugin class should inherit the plugin interfaces it wants to handle
// If you do not want to handle a particular action (e.g. OnBotMessage that is offered in IBotMessage), it's the best idea to not inherit it at all
// This will keep your code compact, efficient and less dependent. You can always add additional interfaces when you'll need them, this example project will inherit quite a bit of them to show you potential usage
internal sealed class ExamplePlugin : IASF, IBot, IBotCommand, IBotConnection, IBotFriendRequest, IBotMessage, IBotModules, IBotTradeOffer {
internal sealed class ExamplePlugin : IASF, IBot, IBotCommand2, IBotConnection, IBotFriendRequest, IBotMessage, IBotModules, IBotTradeOffer {
// This is used for identification purposes, typically you want to use a friendly name of your plugin here, such as the name of your main class
// Please note that this property can have direct dependencies only on structures that were initialized by the constructor, as it's possible to be called before OnLoaded() takes place
public string Name => nameof(ExamplePlugin);
@@ -58,9 +57,9 @@ internal sealed class ExamplePlugin : IASF, IBot, IBotCommand, IBotConnection, I
// Thanks to that, you can extend default ASF config with your own stuff, then parse it here in order to customize your plugin during runtime
// Keep in mind that, as noted in the interface, additionalConfigProperties can be null if no custom, unrecognized properties are found by ASF, you should handle that case appropriately
// In addition to that, this method also guarantees that all plugins were already OnLoaded(), which allows cross-plugins-communication to be possible
public void OnASFInit(IReadOnlyDictionary<string, JToken>? additionalConfigProperties = null) {
public Task OnASFInit(IReadOnlyDictionary<string, JToken>? additionalConfigProperties = null) {
if (additionalConfigProperties == null) {
return;
return Task.CompletedTask;
}
foreach ((string configProperty, JToken configValue) in additionalConfigProperties) {
@@ -73,6 +72,10 @@ internal sealed class ExamplePlugin : IASF, IBot, IBotCommand, IBotConnection, I
break;
}
}
// ASF interface methods usually expect a Task as a return value, this allows you to optionally implement async operations in your functions (with async Task function signature)
// If your method does not implement any async operations (is fully synchronous), you could in theory still mark it as async, but a better idea is to just return Task.CompletedTask from it, like here
return Task.CompletedTask;
}
// This method is called when unknown command is received (starting with CommandPrefix)
@@ -82,11 +85,11 @@ internal sealed class ExamplePlugin : IASF, IBot, IBotCommand, IBotConnection, I
// Since ASF already had to do initial parsing in order to determine that the command is unknown, args[] are splitted using standard ASF delimiters
// If by any chance you want to handle message in its raw format, you also have it available, although for usual ASF pattern you can most likely stick with args[] exclusively. The message has CommandPrefix already stripped for your convenience
// If you do not recognize the command, just return null/empty and allow ASF to gracefully return "unknown command" to user on usual basis
public async Task<string?> OnBotCommand(Bot bot, ulong steamID, string message, string[] args) {
public async Task<string?> OnBotCommand(Bot bot, EAccess access, string message, string[] args, ulong steamID = 0) {
// In comparison with OnBotMessage(), we're using asynchronous CatAPI call here, so we declare our method as async and return the message as usual
// Notice how we handle access here as well, it'll work only for FamilySharing+
switch (args[0].ToUpperInvariant()) {
case "CAT" when bot.HasAccess(steamID, BotConfig.EAccess.FamilySharing):
case "CAT" when access >= EAccess.FamilySharing:
// Notice how we can decide whether to use bot's AWH WebBrowser or ASF's one. For Steam-related requests, AWH's one should always be used, for third-party requests like those it doesn't really matter
// Still, it makes sense to pass AWH's one, so in case you get some errors or alike, you know from which bot instance they come from. It's similar to using Bot's ArchiLogger compared to ASF's one
string? randomCatURL = await CatAPI.GetRandomCatURL(bot.ArchiWebHandler.WebBrowser).ConfigureAwait(false);
@@ -101,12 +104,12 @@ internal sealed class ExamplePlugin : IASF, IBot, IBotCommand, IBotConnection, I
// You should ensure that all of your references to this bot instance are cleared - most of the time this is anything you created in OnBotInit(), including deep roots in your custom modules
// This doesn't have to be done immediately (e.g. no need to cancel existing work), but it should be done in timely manner when everything is finished
// Doing so will allow the garbage collector to dispose the bot afterwards, refraining from doing so will create a "memory leak" by keeping the reference alive
public void OnBotDestroy(Bot bot) { }
public Task OnBotDestroy(Bot bot) => Task.CompletedTask;
// This method is called when bot is disconnected from Steam network, you may want to use this info in some kind of way, or not
// ASF tries its best to provide logical reason why the disconnection has happened, and will use EResult.OK if the disconnection was initiated by us (e.g. as part of a command)
// Still, you should take anything other than EResult.OK with a grain of salt, unless you want to assume that Steam knows why it disconnected us (hehe, you bet)
public void OnBotDisconnected(Bot bot, EResult reason) { }
public Task OnBotDisconnected(Bot bot, EResult reason) => Task.CompletedTask;
// This method is called when bot receives a friend request or group invite that ASF isn't willing to accept
// It allows you to generate a response whether ASF should accept it (true) or proceed like usual (false)
@@ -117,10 +120,12 @@ internal sealed class ExamplePlugin : IASF, IBot, IBotCommand, IBotConnection, I
// This method is called at the end of Bot's constructor
// You can initialize all your per-bot structures here
// In general you should do that only when you have a particular need of custom modules or alike, since ASF's plugin system will always provide bot to you as a function argument
public void OnBotInit(Bot bot) {
public Task OnBotInit(Bot bot) {
// Apart of those two that are already provided by ASF, you can also initialize your own logger with your plugin's name, if needed
bot.ArchiLogger.LogGenericInfo($"Our bot named {bot.BotName} has been initialized, and we're letting you know about it from our {nameof(ExamplePlugin)}!");
ASF.ArchiLogger.LogGenericWarning("In case we won't have a bot reference or have something process-wide to log, we can also use ASF's logger!");
return Task.CompletedTask;
}
// This method, apart from being called during bot modules initialization, allows you to read custom bot config properties that are not recognized by ASF
@@ -128,8 +133,7 @@ internal sealed class ExamplePlugin : IASF, IBot, IBotCommand, IBotConnection, I
// Keep in mind that, as noted in the interface, additionalConfigProperties can be null if no custom, unrecognized properties are found by ASF, you should handle that case appropriately
// Also keep in mind that this function can be called multiple times, e.g. when user edits his bot configs during runtime
// Take a look at OnASFInit() for example parsing code
public async void OnBotInitModules(Bot bot, IReadOnlyDictionary<string, JToken>? additionalConfigProperties = null) {
// ASF marked this message as synchronous, in case we have async code to execute, we can just use async void return
public async Task OnBotInitModules(Bot bot, IReadOnlyDictionary<string, JToken>? additionalConfigProperties = null) {
// For example, we'll ensure that every bot starts paused regardless of Paused property, in order to do this, we'll just call Pause here in InitModules()
// Thanks to the fact that this method is called with each bot config reload, we'll ensure that our bot stays paused even if it'd get unpaused otherwise
bot.ArchiLogger.LogGenericInfo("Pausing this bot as asked from the plugin");
@@ -137,7 +141,7 @@ internal sealed class ExamplePlugin : IASF, IBot, IBotCommand, IBotConnection, I
}
// This method is called when the bot is successfully connected to Steam network and it's a good place to schedule any on-connected tasks, as AWH is also expected to be available shortly
public void OnBotLoggedOn(Bot bot) { }
public Task OnBotLoggedOn(Bot bot) => Task.CompletedTask;
// This method is called when bot receives a message that is NOT a command (in other words, a message that doesn't start with CommandPrefix)
// Normally ASF entirely ignores such messages as the program should not respond to something that isn't recognized
@@ -174,8 +178,10 @@ internal sealed class ExamplePlugin : IASF, IBot, IBotCommand, IBotConnection, I
// If you do not have any global structures to initialize, you can leave this function empty
// At this point you can access core ASF's functionality, such as logging, but more advanced structures (like ASF's WebBrowser) will be available in OnASFInit(), which itself takes place after every plugin gets OnLoaded()
// Typically you should use this function only for preparing core structures of your plugin, and optionally also sending a message to the user (e.g. support link, welcome message or similar), ASF-specific things should usually happen in OnASFInit()
public void OnLoaded() {
public Task OnLoaded() {
ASF.ArchiLogger.LogGenericInfo($"Hey! Thanks for checking if our example plugin works fine, this is a confirmation that indeed {nameof(OnLoaded)}() method was called!");
ASF.ArchiLogger.LogGenericInfo("Good luck in whatever you're doing!");
return Task.CompletedTask;
}
}

View File

@@ -5,6 +5,7 @@
<ItemGroup>
<PackageReference Include="ConfigureAwaitChecker.Analyzer" PrivateAssets="all" />
<PackageReference Include="JetBrains.Annotations" PrivateAssets="all" />
<PackageReference Include="System.Composition.AttributedModel" IncludeAssets="compile" />
</ItemGroup>

View File

@@ -4,7 +4,7 @@
// / ___ \ | | | (__ | | | || | ___) || |_| __/| (_| || | | | | || _|| (_| || | | | | | | |
// /_/ \_\|_| \___||_| |_||_||____/ \__|\___| \__,_||_| |_| |_||_| \__,_||_| |_| |_| |_|
// |
// Copyright 2015-2021 Łukasz "JustArchi" Domeradzki
// Copyright 2015-2022 Łukasz "JustArchi" Domeradzki
// Contact: JustArchi@JustArchi.net
// |
// Licensed under the Apache License, Version 2.0 (the "License");

View File

@@ -4,7 +4,7 @@
// / ___ \ | | | (__ | | | || | ___) || |_| __/| (_| || | | | | || _|| (_| || | | | | | | |
// /_/ \_\|_| \___||_| |_||_||____/ \__|\___| \__,_||_| |_| |_||_| \__,_||_| |_| |_| |_|
// |
// Copyright 2015-2021 Łukasz "JustArchi" Domeradzki
// Copyright 2015-2022 Łukasz "JustArchi" Domeradzki
// Contact: JustArchi@JustArchi.net
// |
// Licensed under the Apache License, Version 2.0 (the "License");
@@ -24,6 +24,7 @@ using System.Composition;
using System.Diagnostics.CodeAnalysis;
using System.Runtime;
using System.Threading;
using System.Threading.Tasks;
using ArchiSteamFarm.Core;
using ArchiSteamFarm.Plugins.Interfaces;
@@ -41,7 +42,7 @@ internal sealed class PeriodicGCPlugin : IPlugin {
public Version Version => typeof(PeriodicGCPlugin).Assembly.GetName().Version ?? throw new InvalidOperationException(nameof(Version));
public void OnLoaded() {
public Task OnLoaded() {
TimeSpan timeSpan = TimeSpan.FromSeconds(GCPeriod);
ASF.ArchiLogger.LogGenericWarning($"Periodic GC will occur every {timeSpan.ToHumanReadable()}. Please keep in mind that this plugin should be used for debugging tests only.");
@@ -49,6 +50,8 @@ internal sealed class PeriodicGCPlugin : IPlugin {
lock (LockObject) {
PeriodicGCTimer.Change(timeSpan, timeSpan);
}
return Task.CompletedTask;
}
private static void PerformGC(object? state = null) {

View File

@@ -4,7 +4,7 @@
// / ___ \ | | | (__ | | | || | ___) || |_| __/| (_| || | | | | || _|| (_| || | | | | | | |
// /_/ \_\|_| \___||_| |_||_||____/ \__|\___| \__,_||_| |_| |_||_| \__,_||_| |_| |_| |_|
// |
// Copyright 2015-2021 Łukasz "JustArchi" Domeradzki
// Copyright 2015-2022 Łukasz "JustArchi" Domeradzki
// Contact: JustArchi@JustArchi.net
// |
// Licensed under the Apache License, Version 2.0 (the "License");

View File

@@ -4,7 +4,7 @@
// / ___ \ | | | (__ | | | || | ___) || |_| __/| (_| || | | | | || _|| (_| || | | | | | | |
// /_/ \_\|_| \___||_| |_||_||____/ \__|\___| \__,_||_| |_| |_||_| \__,_||_| |_| |_| |_|
// |
// Copyright 2015-2021 Łukasz "JustArchi" Domeradzki
// Copyright 2015-2022 Łukasz "JustArchi" Domeradzki
// Contact: JustArchi@JustArchi.net
// |
// Licensed under the Apache License, Version 2.0 (the "License");
@@ -28,7 +28,7 @@ using System.Linq;
using System.Threading.Tasks;
using ArchiSteamFarm.Core;
using ArchiSteamFarm.Helpers;
using ArchiSteamFarm.Localization;
using ArchiSteamFarm.OfficialPlugins.SteamTokenDumper.Localization;
using JetBrains.Annotations;
using Newtonsoft.Json;
using SteamKit2;
@@ -96,20 +96,18 @@ internal sealed class GlobalCache : SerializableFile {
internal static async Task<GlobalCache?> Load() {
if (!File.Exists(SharedFilePath)) {
GlobalCache result = new();
Utilities.InBackground(result.Save);
return result;
return new GlobalCache();
}
ASF.ArchiLogger.LogGenericInfo(Strings.LoadingGlobalCache);
GlobalCache? globalCache;
try {
string json = await File.ReadAllTextAsync(SharedFilePath).ConfigureAwait(false);
if (string.IsNullOrEmpty(json)) {
ASF.ArchiLogger.LogGenericError(string.Format(CultureInfo.CurrentCulture, Strings.ErrorIsEmpty, nameof(json)));
ASF.ArchiLogger.LogGenericError(string.Format(CultureInfo.CurrentCulture, ArchiSteamFarm.Localization.Strings.ErrorIsEmpty, nameof(json)));
return null;
}
@@ -122,7 +120,15 @@ internal sealed class GlobalCache : SerializableFile {
}
if (globalCache == null) {
ASF.ArchiLogger.LogNullError(nameof(globalCache));
ASF.ArchiLogger.LogNullError(globalCache);
return null;
}
ASF.ArchiLogger.LogGenericInfo(Strings.ValidatingGlobalCacheIntegrity);
if (globalCache.DepotKeys.Values.Any(static depotKey => !IsValidDepotKey(depotKey))) {
ASF.ArchiLogger.LogGenericError(Strings.GlobalCacheIntegrityValidationFailed);
return null;
}
@@ -135,9 +141,7 @@ internal sealed class GlobalCache : SerializableFile {
throw new ArgumentOutOfRangeException(nameof(currentChangeNumber));
}
if (appChanges == null) {
throw new ArgumentNullException(nameof(appChanges));
}
ArgumentNullException.ThrowIfNull(appChanges);
if (currentChangeNumber <= LastChangeNumber) {
return;
@@ -146,7 +150,7 @@ internal sealed class GlobalCache : SerializableFile {
LastChangeNumber = currentChangeNumber;
foreach ((uint appID, SteamApps.PICSChangesCallback.PICSChangeData appData) in appChanges) {
if (!AppChangeNumbers.TryGetValue(appID, out uint previousChangeNumber) || (appData.ChangeNumber <= previousChangeNumber)) {
if (!AppChangeNumbers.TryGetValue(appID, out uint previousChangeNumber) || (previousChangeNumber >= appData.ChangeNumber)) {
continue;
}
@@ -175,14 +179,12 @@ internal sealed class GlobalCache : SerializableFile {
internal bool ShouldRefreshDepotKey(uint depotID) => !DepotKeys.ContainsKey(depotID);
internal void UpdateAppChangeNumbers(IReadOnlyCollection<KeyValuePair<uint, uint>> appChangeNumbers) {
if (appChangeNumbers == null) {
throw new ArgumentNullException(nameof(appChangeNumbers));
}
ArgumentNullException.ThrowIfNull(appChangeNumbers);
bool save = false;
foreach ((uint appID, uint changeNumber) in appChangeNumbers) {
if (AppChangeNumbers.TryGetValue(appID, out uint previousChangeNumber) && (previousChangeNumber == changeNumber)) {
if (AppChangeNumbers.TryGetValue(appID, out uint previousChangeNumber) && (previousChangeNumber >= changeNumber)) {
continue;
}
@@ -196,13 +198,8 @@ internal sealed class GlobalCache : SerializableFile {
}
internal void UpdateAppTokens(IReadOnlyCollection<KeyValuePair<uint, ulong>> appTokens, IReadOnlyCollection<uint> publicAppIDs) {
if (appTokens == null) {
throw new ArgumentNullException(nameof(appTokens));
}
if (publicAppIDs == null) {
throw new ArgumentNullException(nameof(publicAppIDs));
}
ArgumentNullException.ThrowIfNull(appTokens);
ArgumentNullException.ThrowIfNull(publicAppIDs);
bool save = false;
@@ -230,9 +227,7 @@ internal sealed class GlobalCache : SerializableFile {
}
internal void UpdateDepotKeys(ICollection<SteamApps.DepotKeyCallback> depotKeyResults) {
if (depotKeyResults == null) {
throw new ArgumentNullException(nameof(depotKeyResults));
}
ArgumentNullException.ThrowIfNull(depotKeyResults);
bool save = false;
@@ -243,6 +238,12 @@ internal sealed class GlobalCache : SerializableFile {
string depotKey = Convert.ToHexString(depotKeyResult.DepotKey);
if (!IsValidDepotKey(depotKey)) {
ASF.ArchiLogger.LogGenericWarning(string.Format(CultureInfo.CurrentCulture, ArchiSteamFarm.Localization.Strings.ErrorIsInvalid, nameof(depotKey)));
continue;
}
if (DepotKeys.TryGetValue(depotKeyResult.DepotID, out string? previousDepotKey) && (previousDepotKey == depotKey)) {
continue;
}
@@ -257,9 +258,7 @@ internal sealed class GlobalCache : SerializableFile {
}
internal void UpdatePackageTokens(IReadOnlyCollection<KeyValuePair<uint, ulong>> packageTokens) {
if (packageTokens == null) {
throw new ArgumentNullException(nameof(packageTokens));
}
ArgumentNullException.ThrowIfNull(packageTokens);
bool save = false;
@@ -278,30 +277,49 @@ internal sealed class GlobalCache : SerializableFile {
}
internal void UpdateSubmittedData(IReadOnlyDictionary<uint, ulong> apps, IReadOnlyDictionary<uint, ulong> packages, IReadOnlyDictionary<uint, string> depots) {
if (apps == null) {
throw new ArgumentNullException(nameof(apps));
}
ArgumentNullException.ThrowIfNull(apps);
ArgumentNullException.ThrowIfNull(packages);
ArgumentNullException.ThrowIfNull(depots);
if (packages == null) {
throw new ArgumentNullException(nameof(packages));
}
if (depots == null) {
throw new ArgumentNullException(nameof(depots));
}
bool save = false;
foreach ((uint appID, ulong token) in apps) {
if (SubmittedApps.TryGetValue(appID, out ulong previousToken) && (previousToken == token)) {
continue;
}
SubmittedApps[appID] = token;
save = true;
}
foreach ((uint packageID, ulong token) in packages) {
if (SubmittedPackages.TryGetValue(packageID, out ulong previousToken) && (previousToken == token)) {
continue;
}
SubmittedPackages[packageID] = token;
save = true;
}
foreach ((uint depotID, string key) in depots) {
if (SubmittedDepots.TryGetValue(depotID, out string? previousKey) && (previousKey == key)) {
continue;
}
SubmittedDepots[depotID] = key;
save = true;
}
Utilities.InBackground(Save);
if (save) {
Utilities.InBackground(Save);
}
}
private static bool IsValidDepotKey(string depotKey) {
if (string.IsNullOrEmpty(depotKey)) {
throw new ArgumentNullException(nameof(depotKey));
}
return (depotKey.Length == 64) && Utilities.IsValidHexadecimalText(depotKey);
}
}

View File

@@ -4,7 +4,7 @@
// / ___ \ | | | (__ | | | || | ___) || |_| __/| (_| || | | | | || _|| (_| || | | | | | | |
// /_/ \_\|_| \___||_| |_||_||____/ \__|\___| \__,_||_| |_| |_||_| \__,_||_| |_| |_| |_|
// |
// Copyright 2015-2021 Łukasz "JustArchi" Domeradzki
// Copyright 2015-2022 Łukasz "JustArchi" Domeradzki
// Contact: JustArchi@JustArchi.net
// |
// Licensed under the Apache License, Version 2.0 (the "License");

View File

@@ -1,7 +1,6 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
@@ -12,46 +11,32 @@ namespace ArchiSteamFarm.OfficialPlugins.SteamTokenDumper.Localization {
using System;
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
// This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Strings {
private static global::System.Resources.ResourceManager resourceMan;
private static System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
private static System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Strings() {
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
internal static System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ArchiSteamFarm.OfficialPlugins.SteamTokenDumper.Localization.Strings", typeof(Strings).Assembly);
if (object.Equals(null, resourceMan)) {
System.Resources.ResourceManager temp = new System.Resources.ResourceManager("ArchiSteamFarm.OfficialPlugins.SteamTokenDumper.Localization.Strings", typeof(Strings).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
internal static System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
@@ -60,246 +45,183 @@ namespace ArchiSteamFarm.OfficialPlugins.SteamTokenDumper.Localization {
}
}
/// <summary>
/// Looks up a localized string similar to Finished retrieving {0} app access tokens..
/// </summary>
internal static string BotFinishedRetrievingAppAccessTokens {
get {
return ResourceManager.GetString("BotFinishedRetrievingAppAccessTokens", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Finished retrieving {0} app infos..
/// </summary>
internal static string BotFinishedRetrievingAppInfos {
get {
return ResourceManager.GetString("BotFinishedRetrievingAppInfos", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Finished retrieving {0} depot keys..
/// </summary>
internal static string BotFinishedRetrievingDepotKeys {
get {
return ResourceManager.GetString("BotFinishedRetrievingDepotKeys", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Finished retrieving a total of {0} app access tokens..
/// </summary>
internal static string BotFinishedRetrievingTotalAppAccessTokens {
get {
return ResourceManager.GetString("BotFinishedRetrievingTotalAppAccessTokens", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Finished retrieving all depot keys for a total of {0} apps..
/// </summary>
internal static string BotFinishedRetrievingTotalDepots {
get {
return ResourceManager.GetString("BotFinishedRetrievingTotalDepots", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to There are no apps that require a refresh on this bot instance..
/// </summary>
internal static string BotNoAppsToRefresh {
get {
return ResourceManager.GetString("BotNoAppsToRefresh", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Retrieving {0} app access tokens....
/// </summary>
internal static string BotRetrievingAppAccessTokens {
get {
return ResourceManager.GetString("BotRetrievingAppAccessTokens", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Retrieving {0} app infos....
/// </summary>
internal static string BotRetrievingAppInfos {
get {
return ResourceManager.GetString("BotRetrievingAppInfos", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Retrieving {0} depot keys....
/// </summary>
internal static string BotRetrievingDepotKeys {
get {
return ResourceManager.GetString("BotRetrievingDepotKeys", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Retrieving a total of {0} app access tokens....
/// </summary>
internal static string BotRetrievingTotalAppAccessTokens {
get {
return ResourceManager.GetString("BotRetrievingTotalAppAccessTokens", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Retrieving all depots for a total of {0} apps....
/// </summary>
internal static string BotRetrievingTotalDepots {
get {
return ResourceManager.GetString("BotRetrievingTotalDepots", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to {0} could not be loaded, a fresh instance will be initialized....
/// </summary>
internal static string FileCouldNotBeLoadedFreshInit {
get {
return ResourceManager.GetString("FileCouldNotBeLoadedFreshInit", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to {0} is currently disabled according to your configuration. If you&apos;d like to help SteamDB in data submission, please check out our wiki..
/// </summary>
internal static string PluginDisabledInConfig {
get {
return ResourceManager.GetString("PluginDisabledInConfig", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to {0} has been disabled due to a missing build token.
/// </summary>
internal static string PluginDisabledMissingBuildToken {
get {
return ResourceManager.GetString("PluginDisabledMissingBuildToken", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to {0} has been initialized successfully, thank you in advance for your help. The first submission will happen in approximately {1} from now..
/// </summary>
internal static string PluginDisabledInConfig {
get {
return ResourceManager.GetString("PluginDisabledInConfig", resourceCulture);
}
}
internal static string PluginInitializedAndEnabled {
get {
return ResourceManager.GetString("PluginInitializedAndEnabled", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to {0} initialized, the plugin will not resolve any of those: {1}..
/// </summary>
internal static string PluginSecretListInitialized {
internal static string FileCouldNotBeLoadedFreshInit {
get {
return ResourceManager.GetString("PluginSecretListInitialized", resourceCulture);
return ResourceManager.GetString("FileCouldNotBeLoadedFreshInit", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to The submission has failed due to too many requests sent, we&apos;ll try again in approximately {0} from now..
/// </summary>
internal static string SubmissionFailedTooManyRequests {
internal static string BotNoAppsToRefresh {
get {
return ResourceManager.GetString("SubmissionFailedTooManyRequests", resourceCulture);
return ResourceManager.GetString("BotNoAppsToRefresh", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Submitting a total of registered apps/packages/depots: {0}/{1}/{2}....
/// </summary>
internal static string SubmissionInProgress {
internal static string BotRetrievingTotalAppAccessTokens {
get {
return ResourceManager.GetString("SubmissionInProgress", resourceCulture);
return ResourceManager.GetString("BotRetrievingTotalAppAccessTokens", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Could not submit the data because there is no valid SteamID set that we could classify as a contributor. Consider setting up {0} property..
/// </summary>
internal static string SubmissionNoContributorSet {
internal static string BotRetrievingAppAccessTokens {
get {
return ResourceManager.GetString("SubmissionNoContributorSet", resourceCulture);
return ResourceManager.GetString("BotRetrievingAppAccessTokens", resourceCulture);
}
}
internal static string BotFinishedRetrievingAppAccessTokens {
get {
return ResourceManager.GetString("BotFinishedRetrievingAppAccessTokens", resourceCulture);
}
}
internal static string BotFinishedRetrievingTotalAppAccessTokens {
get {
return ResourceManager.GetString("BotFinishedRetrievingTotalAppAccessTokens", resourceCulture);
}
}
internal static string BotRetrievingTotalDepots {
get {
return ResourceManager.GetString("BotRetrievingTotalDepots", resourceCulture);
}
}
internal static string BotRetrievingAppInfos {
get {
return ResourceManager.GetString("BotRetrievingAppInfos", resourceCulture);
}
}
internal static string BotFinishedRetrievingAppInfos {
get {
return ResourceManager.GetString("BotFinishedRetrievingAppInfos", resourceCulture);
}
}
internal static string BotRetrievingDepotKeys {
get {
return ResourceManager.GetString("BotRetrievingDepotKeys", resourceCulture);
}
}
internal static string BotFinishedRetrievingDepotKeys {
get {
return ResourceManager.GetString("BotFinishedRetrievingDepotKeys", resourceCulture);
}
}
internal static string BotFinishedRetrievingTotalDepots {
get {
return ResourceManager.GetString("BotFinishedRetrievingTotalDepots", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to There is no new data to submit, everything is up-to-date..
/// </summary>
internal static string SubmissionNoNewData {
get {
return ResourceManager.GetString("SubmissionNoNewData", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to The data has been successfully submitted. The server has registered a total of new apps/packages/depots: {0} ({1} verified)/{2} ({3} verified)/{4} ({5} verified)..
/// </summary>
internal static string SubmissionNoContributorSet {
get {
return ResourceManager.GetString("SubmissionNoContributorSet", resourceCulture);
}
}
internal static string SubmissionInProgress {
get {
return ResourceManager.GetString("SubmissionInProgress", resourceCulture);
}
}
internal static string SubmissionFailedTooManyRequests {
get {
return ResourceManager.GetString("SubmissionFailedTooManyRequests", resourceCulture);
}
}
internal static string SubmissionSuccessful {
get {
return ResourceManager.GetString("SubmissionSuccessful", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to New apps: {0}.
/// </summary>
internal static string SubmissionSuccessfulNewApps {
get {
return ResourceManager.GetString("SubmissionSuccessfulNewApps", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to New depots: {0}.
/// </summary>
internal static string SubmissionSuccessfulNewDepots {
get {
return ResourceManager.GetString("SubmissionSuccessfulNewDepots", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to New packages: {0}.
/// </summary>
internal static string SubmissionSuccessfulNewPackages {
get {
return ResourceManager.GetString("SubmissionSuccessfulNewPackages", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Verified apps: {0}.
/// </summary>
internal static string SubmissionSuccessfulVerifiedApps {
get {
return ResourceManager.GetString("SubmissionSuccessfulVerifiedApps", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Verified depots: {0}.
/// </summary>
internal static string SubmissionSuccessfulNewPackages {
get {
return ResourceManager.GetString("SubmissionSuccessfulNewPackages", resourceCulture);
}
}
internal static string SubmissionSuccessfulVerifiedPackages {
get {
return ResourceManager.GetString("SubmissionSuccessfulVerifiedPackages", resourceCulture);
}
}
internal static string SubmissionSuccessfulNewDepots {
get {
return ResourceManager.GetString("SubmissionSuccessfulNewDepots", resourceCulture);
}
}
internal static string SubmissionSuccessfulVerifiedDepots {
get {
return ResourceManager.GetString("SubmissionSuccessfulVerifiedDepots", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Verified packages: {0}.
/// </summary>
internal static string SubmissionSuccessfulVerifiedPackages {
internal static string PluginSecretListInitialized {
get {
return ResourceManager.GetString("SubmissionSuccessfulVerifiedPackages", resourceCulture);
return ResourceManager.GetString("PluginSecretListInitialized", resourceCulture);
}
}
internal static string LoadingGlobalCache {
get {
return ResourceManager.GetString("LoadingGlobalCache", resourceCulture);
}
}
internal static string ValidatingGlobalCacheIntegrity {
get {
return ResourceManager.GetString("ValidatingGlobalCacheIntegrity", resourceCulture);
}
}
internal static string GlobalCacheIntegrityValidationFailed {
get {
return ResourceManager.GetString("GlobalCacheIntegrityValidationFailed", resourceCulture);
}
}
}

View File

@@ -62,31 +62,119 @@
PublicKeyToken=b77a5c561934e089
</value>
</resheader>
<data name="PluginDisabledMissingBuildToken" xml:space="preserve">
<value>{0} byl zakázán z důvodu chybějícího tokenu</value>
<comment>{0} will be replaced by the name of the plugin (e.g. "SteamTokenDumperPlugin")</comment>
</data>
<data name="PluginDisabledInConfig" xml:space="preserve">
<value>{0} je v současné době v souladu s vaší konfigurací zakázán. Pokud byste chtěli pomoci SteamDB při odesílání dat, podívejte se na naši wiki.</value>
<comment>{0} will be replaced by the name of the plugin (e.g. "SteamTokenDumperPlugin")</comment>
</data>
<data name="PluginInitializedAndEnabled" xml:space="preserve">
<value>{0} byl úspěšně inicializován, předem vám děkujeme za vaši pomoc. První příspěvek se od teď stane přibližně za {1}.</value>
<comment>{0} will be replaced by the name of the plugin (e.g. "SteamTokenDumperPlugin"), {1} will be replaced by translated TimeSpan string (such as "53 minutes")</comment>
</data>
<data name="FileCouldNotBeLoadedFreshInit" xml:space="preserve">
<value>{0} nelze načíst, nová instance bude inicializována...</value>
<comment>{0} will be replaced by the name of the file (e.g. "GlobalCache")</comment>
</data>
<data name="BotNoAppsToRefresh" xml:space="preserve">
<value>Neexistují žádné aplikace, které by vyžadovaly aktualizaci této instance bota.</value>
</data>
<data name="BotRetrievingTotalAppAccessTokens" xml:space="preserve">
<value>Načítám celkem {0} přístupových tokenů...</value>
<comment>{0} will be replaced by the number (total count) of app access tokens being retrieved</comment>
</data>
<data name="BotRetrievingAppAccessTokens" xml:space="preserve">
<value>Načítání {0} přístupových tokenů...</value>
<comment>{0} will be replaced by the number (count this batch) of app access tokens being retrieved</comment>
</data>
<data name="BotFinishedRetrievingAppAccessTokens" xml:space="preserve">
<value>Načítání {0} přístupových tokenů bylo dokončeno.</value>
<comment>{0} will be replaced by the number (count this batch) of app access tokens retrieved</comment>
</data>
<data name="BotFinishedRetrievingTotalAppAccessTokens" xml:space="preserve">
<value>Dokončeno načítání celkem {0} přístupových tokenů.</value>
<comment>{0} will be replaced by the number (total count) of app access tokens retrieved</comment>
</data>
<data name="BotRetrievingTotalDepots" xml:space="preserve">
<value>Načítání všech úložišť, celkem z {0} aplikací...</value>
<comment>{0} will be replaced by the number (total count) of apps being retrieved</comment>
</data>
<data name="BotRetrievingAppInfos" xml:space="preserve">
<value>Získávání {0} informací o aplikaci...</value>
<comment>{0} will be replaced by the number (count this batch) of app infos being retrieved</comment>
</data>
<data name="BotFinishedRetrievingAppInfos" xml:space="preserve">
<value>Načítání informací o aplikaci {0} bylo dokončeno.</value>
<comment>{0} will be replaced by the number (count this batch) of app infos retrieved</comment>
</data>
<data name="BotRetrievingDepotKeys" xml:space="preserve">
<value>Získávání {0} tokenů úložišť...</value>
<comment>{0} will be replaced by the number (count this batch) of depot keys being retrieved</comment>
</data>
<data name="BotFinishedRetrievingDepotKeys" xml:space="preserve">
<value>Načítání {0} přístupových tokenů bylo dokončeno.</value>
<comment>{0} will be replaced by the number (count this batch) of depot keys retrieved</comment>
</data>
<data name="BotFinishedRetrievingTotalDepots" xml:space="preserve">
<value>Načítání všech tokenbů úložišť, celkem z {0} aplikací bylo dokončeno.</value>
<comment>{0} will be replaced by the number (total count) of apps retrieved</comment>
</data>
<data name="SubmissionNoNewData" xml:space="preserve">
<value>Nejsou k dispozici žádné nové údaje k odeslání, vše je aktuální.</value>
</data>
<data name="SubmissionNoContributorSet" xml:space="preserve">
<value>Data nelze odeslat, protože neexistuje žádné platné SteamID, které bychom mohli klasifikovat jako přispěvatele. Zvažte nastavení {0} parametrů.</value>
<comment>{0} will be replaced by the name of the config property (e.g. "SteamOwnerID") that the user is expected to set</comment>
</data>
<data name="SubmissionInProgress" xml:space="preserve">
<value>Odesílání celkem registrovaných aplikací/balíčků/úložišť: {0}/{1}/{2}...</value>
<comment>{0} will be replaced by the number of app access tokens being submitted, {1} will be replaced by the number of package access tokens being submitted, {2} will be replaced by the number of depot keys being submitted</comment>
</data>
<data name="SubmissionFailedTooManyRequests" xml:space="preserve">
<value>Odeslání se nezdařilo z důvodu příliš mnoha odeslaných požadavků. Pokusíme se znovu přibližně za {0}.</value>
<comment>{0} will be replaced by translated TimeSpan string (such as "53 minutes")</comment>
</data>
<data name="SubmissionSuccessful" xml:space="preserve">
<value>Data byla úspěšně odeslána. Server zaregistroval celkem nové aplikace/balíčky/úložiště: {0} ({1} ověřeno)/{2} ({3} ověřeno)/{4} ({5} ověřeno).</value>
<comment>{0} will be replaced by the number of new app access tokens that the server has registered, {1} will be replaced by the number of verified app access tokens that the server has registered, {2} will be replaced by the number of new package access tokens that the server has registered, {3} will be replaced by the number of verified package access tokens that the server has registered, {4} will be replaced by the number of new depot keys that the server has registered, {5} will be replaced by the number of verified depot keys that the server has registered</comment>
</data>
<data name="SubmissionSuccessfulNewApps" xml:space="preserve">
<value>Nové aplikace: {0}</value>
<comment>{0} will be replaced by list of the apps (IDs, numbers), separated by a comma</comment>
</data>
<data name="SubmissionSuccessfulVerifiedApps" xml:space="preserve">
<value>Ověřené aplikace: {0}</value>
<comment>{0} will be replaced by list of the apps (IDs, numbers), separated by a comma</comment>
</data>
<data name="SubmissionSuccessfulNewPackages" xml:space="preserve">
<value>Nové balíčky: {0}</value>
<comment>{0} will be replaced by list of the packages (IDs, numbers), separated by a comma</comment>
</data>
<data name="SubmissionSuccessfulVerifiedPackages" xml:space="preserve">
<value>Ověřené balíčky: {0}</value>
<comment>{0} will be replaced by list of the packages (IDs, numbers), separated by a comma</comment>
</data>
<data name="SubmissionSuccessfulNewDepots" xml:space="preserve">
<value>Nová úložiště: {0}</value>
<comment>{0} will be replaced by list of the depots (IDs, numbers), separated by a comma</comment>
</data>
<data name="SubmissionSuccessfulVerifiedDepots" xml:space="preserve">
<value>Ověřená úložiště: {0}</value>
<comment>{0} will be replaced by list of the depots (IDs, numbers), separated by a comma</comment>
</data>
<data name="PluginSecretListInitialized" xml:space="preserve">
<value>{0} inicializován, žádný plugin nebude rozpoznávat: {1}.</value>
<comment>{0} will be replaced by the name of the config property (e.g. "SecretPackageIDs"), {1} will be replaced by list of the objects (IDs, numbers), separated by a comma</comment>
</data>
<data name="LoadingGlobalCache" xml:space="preserve">
<value>Načítání globální mezipaměti STD...</value>
</data>
<data name="ValidatingGlobalCacheIntegrity" xml:space="preserve">
<value>Ověřování globální integrity STD keše...</value>
</data>
<data name="GlobalCacheIntegrityValidationFailed" xml:space="preserve">
<value>Ověření globální integrity STD keše se nezdařilo. To naznačuje, že může dojít k poškození souboru/paměti, místo toho bude inicializována nová instance.</value>
</data>
</root>

View File

@@ -168,4 +168,13 @@
<value>{0} wurde initialisiert, das Plugin wird keinen der folgenden Werte verarbeiten: {1}.</value>
<comment>{0} will be replaced by the name of the config property (e.g. "SecretPackageIDs"), {1} will be replaced by list of the objects (IDs, numbers), separated by a comma</comment>
</data>
<data name="LoadingGlobalCache" xml:space="preserve">
<value>Globaler STD-Cache wird geladen...</value>
</data>
<data name="ValidatingGlobalCacheIntegrity" xml:space="preserve">
<value>Überprüfe STD globale Cache-Integrität...</value>
</data>
<data name="GlobalCacheIntegrityValidationFailed" xml:space="preserve">
<value>Fehler beim Überprüfen der globalen STD-Cache-Integrität. Dies deutet auf eine mögliche Datei-/Speicher-Beschädigung hin; stattdessen wird eine neue Instanz initialisiert.</value>
</data>
</root>

View File

@@ -168,4 +168,13 @@
<value>{0} αρχικοποιήθηκε, το plugin δεν θα επιλύσει κανένα από αυτά: {1}.</value>
<comment>{0} will be replaced by the name of the config property (e.g. "SecretPackageIDs"), {1} will be replaced by list of the objects (IDs, numbers), separated by a comma</comment>
</data>
<data name="LoadingGlobalCache" xml:space="preserve">
<value>Φόρτωση καθολικής μνήμης cache...</value>
</data>
<data name="ValidatingGlobalCacheIntegrity" xml:space="preserve">
<value>Επικύρωση ακεραιότητας καθολικής λανθάνουσας μνήμης STD...</value>
</data>
<data name="GlobalCacheIntegrityValidationFailed" xml:space="preserve">
<value>Αποτυχία επαλήθευσης ακεραιότητας καθολικής λανθάνουσας μνήμης STD. Αυτό υποδηλώνει πιθανή διαφθορά αρχείου/μνήμης, αντ' αυτού θα ξεκινήσει μια νέα διεργασία.</value>
</data>
</root>

View File

@@ -168,4 +168,13 @@
<value>{0} iniciado, el plugin no analizará ninguno de los siguientes: {1}.</value>
<comment>{0} will be replaced by the name of the config property (e.g. "SecretPackageIDs"), {1} will be replaced by list of the objects (IDs, numbers), separated by a comma</comment>
</data>
<data name="LoadingGlobalCache" xml:space="preserve">
<value>Cargando caché global de STD... </value>
</data>
<data name="ValidatingGlobalCacheIntegrity" xml:space="preserve">
<value>Validando integridad de la caché global de STD... </value>
</data>
<data name="GlobalCacheIntegrityValidationFailed" xml:space="preserve">
<value>No se pudo verificar la integridad de la caché global de STD. Esto puede significar una potencial corrupción de archivo/memoria, se iniciará una nueva instancia. </value>
</data>
</root>

View File

@@ -62,31 +62,119 @@
PublicKeyToken=b77a5c561934e089
</value>
</resheader>
<data name="PluginDisabledMissingBuildToken" xml:space="preserve">
<value>{0} on poistettu käytöstä puuttuvan koontitunnuksen vuoksi</value>
<comment>{0} will be replaced by the name of the plugin (e.g. "SteamTokenDumperPlugin")</comment>
</data>
<data name="PluginDisabledInConfig" xml:space="preserve">
<value>{0} on tällä hetkellä poistettu käytöstä asetuksistasi. Jos haluat auttaa SteamDB:tä tietojen lähettämisessä, ole hyvä ja tutustu wikimme.</value>
<comment>{0} will be replaced by the name of the plugin (e.g. "SteamTokenDumperPlugin")</comment>
</data>
<data name="PluginInitializedAndEnabled" xml:space="preserve">
<value>{0} on alustettu onnistuneesti, kiitos etukäteen avustasi. Ensimmäinen lähetys tapahtuu noin {1} jälkeen.</value>
<comment>{0} will be replaced by the name of the plugin (e.g. "SteamTokenDumperPlugin"), {1} will be replaced by translated TimeSpan string (such as "53 minutes")</comment>
</data>
<data name="FileCouldNotBeLoadedFreshInit" xml:space="preserve">
<value>{0} ei voitu ladata. Uusi instanssi alustetaan...</value>
<comment>{0} will be replaced by the name of the file (e.g. "GlobalCache")</comment>
</data>
<data name="BotNoAppsToRefresh" xml:space="preserve">
<value>Ei ole sovelluksia, jotka vaatisivat päivitystä tässä botin instanssissa.</value>
</data>
<data name="BotRetrievingTotalAppAccessTokens" xml:space="preserve">
<value>Haetaan yhteensä {0} sovelluksen käyttötunnisteita...</value>
<comment>{0} will be replaced by the number (total count) of app access tokens being retrieved</comment>
</data>
<data name="BotRetrievingAppAccessTokens" xml:space="preserve">
<value>Haetaan {0} sovelluksen käyttötunnisteita...</value>
<comment>{0} will be replaced by the number (count this batch) of app access tokens being retrieved</comment>
</data>
<data name="BotFinishedRetrievingAppAccessTokens" xml:space="preserve">
<value>Saatiin haettua {0} sovelluksen käyttötunnisteet.</value>
<comment>{0} will be replaced by the number (count this batch) of app access tokens retrieved</comment>
</data>
<data name="BotFinishedRetrievingTotalAppAccessTokens" xml:space="preserve">
<value>Saatiin haettua yhteensä {0} sovelluksen käyttötunnisteet.</value>
<comment>{0} will be replaced by the number (total count) of app access tokens retrieved</comment>
</data>
<data name="BotRetrievingTotalDepots" xml:space="preserve">
<value>Haetaan kaikkia depotteja yhteensä {0} sovellukselle...</value>
<comment>{0} will be replaced by the number (total count) of apps being retrieved</comment>
</data>
<data name="BotRetrievingAppInfos" xml:space="preserve">
<value>Haetaan {0} sovelluksen tietoja...</value>
<comment>{0} will be replaced by the number (count this batch) of app infos being retrieved</comment>
</data>
<data name="BotFinishedRetrievingAppInfos" xml:space="preserve">
<value>Saatiin haettua {0} sovelluksen tiedot.</value>
<comment>{0} will be replaced by the number (count this batch) of app infos retrieved</comment>
</data>
<data name="BotRetrievingDepotKeys" xml:space="preserve">
<value>Haetaan {0} depot-avainta...</value>
<comment>{0} will be replaced by the number (count this batch) of depot keys being retrieved</comment>
</data>
<data name="BotFinishedRetrievingDepotKeys" xml:space="preserve">
<value>Saatiin haettua {0} depot-avainta.</value>
<comment>{0} will be replaced by the number (count this batch) of depot keys retrieved</comment>
</data>
<data name="BotFinishedRetrievingTotalDepots" xml:space="preserve">
<value>Saatiin haettua kaikki depot-avaimet yhteensä {0} sovellukselle.</value>
<comment>{0} will be replaced by the number (total count) of apps retrieved</comment>
</data>
<data name="SubmissionNoNewData" xml:space="preserve">
<value>Uutta dataa ei ole lähetettäväksi, kaikki on ajan tasalla.</value>
</data>
<data name="SubmissionNoContributorSet" xml:space="preserve">
<value>Tietoja ei voitu lähettää, koska ei ole voimassa olevaa SteamID-ryhmää, jonka voisimme luokitella osallistujaksi. Harkitse ominaisuuden {0} asettamista.</value>
<comment>{0} will be replaced by the name of the config property (e.g. "SteamOwnerID") that the user is expected to set</comment>
</data>
<data name="SubmissionInProgress" xml:space="preserve">
<value>Lähetetään yhteensä {0}/{1}/{2} rekisteröityjä sovelluksia/paketteja/varikoita...</value>
<comment>{0} will be replaced by the number of app access tokens being submitted, {1} will be replaced by the number of package access tokens being submitted, {2} will be replaced by the number of depot keys being submitted</comment>
</data>
<data name="SubmissionFailedTooManyRequests" xml:space="preserve">
<value>Lähetys epäonnistui liian monen pyynnön vuoksi, yritämme uudelleen noin {0} kuluttua.</value>
<comment>{0} will be replaced by translated TimeSpan string (such as "53 minutes")</comment>
</data>
<data name="SubmissionSuccessful" xml:space="preserve">
<value>Tiedot on lähetetty onnistuneesti. Palvelin on rekisteröinyt yhteensä uusia sovelluksia/paketteja/depoteja: {0} ({1} vahvistettu)/{2} ({3} vahvistettu)/{4} ({5} vahvistettu).</value>
<comment>{0} will be replaced by the number of new app access tokens that the server has registered, {1} will be replaced by the number of verified app access tokens that the server has registered, {2} will be replaced by the number of new package access tokens that the server has registered, {3} will be replaced by the number of verified package access tokens that the server has registered, {4} will be replaced by the number of new depot keys that the server has registered, {5} will be replaced by the number of verified depot keys that the server has registered</comment>
</data>
<data name="SubmissionSuccessfulNewApps" xml:space="preserve">
<value>Uudet sovellukset: {0}</value>
<comment>{0} will be replaced by list of the apps (IDs, numbers), separated by a comma</comment>
</data>
<data name="SubmissionSuccessfulVerifiedApps" xml:space="preserve">
<value>Vahvistetut sovellukset: {0}</value>
<comment>{0} will be replaced by list of the apps (IDs, numbers), separated by a comma</comment>
</data>
<data name="SubmissionSuccessfulNewPackages" xml:space="preserve">
<value>Uudet paketit: {0}</value>
<comment>{0} will be replaced by list of the packages (IDs, numbers), separated by a comma</comment>
</data>
<data name="SubmissionSuccessfulVerifiedPackages" xml:space="preserve">
<value>Vahvistetut paketit: {0}</value>
<comment>{0} will be replaced by list of the packages (IDs, numbers), separated by a comma</comment>
</data>
<data name="SubmissionSuccessfulNewDepots" xml:space="preserve">
<value>Uudet depotit: {0}</value>
<comment>{0} will be replaced by list of the depots (IDs, numbers), separated by a comma</comment>
</data>
<data name="SubmissionSuccessfulVerifiedDepots" xml:space="preserve">
<value>Vahvistetut depotit: {0}</value>
<comment>{0} will be replaced by list of the depots (IDs, numbers), separated by a comma</comment>
</data>
<data name="PluginSecretListInitialized" xml:space="preserve">
<value>{0} alustettu, laajennus ei käsittele yhtään näistä: {1}.</value>
<comment>{0} will be replaced by the name of the config property (e.g. "SecretPackageIDs"), {1} will be replaced by list of the objects (IDs, numbers), separated by a comma</comment>
</data>
<data name="LoadingGlobalCache" xml:space="preserve">
<value>Ladataan STD:n globaalia välimuistia...</value>
</data>
<data name="ValidatingGlobalCacheIntegrity" xml:space="preserve">
<value>Tarkistetaan STD-välimuistin eheys...</value>
</data>
<data name="GlobalCacheIntegrityValidationFailed" xml:space="preserve">
<value>STD:n globaalin välimuistin eheyden varmistaminen epäonnistui. Tämä viittaa mahdolliseen tiedoston/muistin korruptioon, uusi instanssi käynnistetään sen sijaan.</value>
</data>
</root>

View File

@@ -168,4 +168,13 @@
<value>{0} initialisé, le plugin ne résoudra aucun de ceux-ci : {1}.</value>
<comment>{0} will be replaced by the name of the config property (e.g. "SecretPackageIDs"), {1} will be replaced by list of the objects (IDs, numbers), separated by a comma</comment>
</data>
<data name="LoadingGlobalCache" xml:space="preserve">
<value>Chargement du cache STD global...</value>
</data>
<data name="ValidatingGlobalCacheIntegrity" xml:space="preserve">
<value>Validation de l'intégrité du cache STD global...</value>
</data>
<data name="GlobalCacheIntegrityValidationFailed" xml:space="preserve">
<value>Impossible de vérifier l'intégrité du cache STD global. Cela peut être due à une corruption potentielle de fichier/mémoire, une nouvelle instance va être créée.</value>
</data>
</root>

View File

@@ -82,11 +82,35 @@
<data name="SubmissionSuccessfulNewApps" xml:space="preserve">
<value>יישומים חדשים: {0}</value>
<comment>{0} will be replaced by list of the apps (IDs, numbers), separated by a comma</comment>
</data>
<data name="SubmissionSuccessfulVerifiedApps" xml:space="preserve">
<value>יישומים מאומתים: {0}</value>
<comment>{0} will be replaced by list of the apps (IDs, numbers), separated by a comma</comment>
</data>
<data name="SubmissionSuccessfulNewPackages" xml:space="preserve">
<value>חבילות חדשות: {0}</value>
<comment>{0} will be replaced by list of the packages (IDs, numbers), separated by a comma</comment>
</data>
<data name="SubmissionSuccessfulVerifiedPackages" xml:space="preserve">
<value>חבילות מאומתות: {0}</value>
<comment>{0} will be replaced by list of the packages (IDs, numbers), separated by a comma</comment>
</data>
<data name="PluginSecretListInitialized" xml:space="preserve">
<value>{0} אותחל, הפלאגין לא יפתור אף אחד מאלה: {1}.</value>
<comment>{0} will be replaced by the name of the config property (e.g. "SecretPackageIDs"), {1} will be replaced by list of the objects (IDs, numbers), separated by a comma</comment>
</data>
<data name="LoadingGlobalCache" xml:space="preserve">
<value>טוען מטמון עולמי מסוג STD...</value>
</data>
<data name="ValidatingGlobalCacheIntegrity" xml:space="preserve">
<value>מאמת את שלמות מטמון ה-STD העולמי...</value>
</data>
<data name="GlobalCacheIntegrityValidationFailed" xml:space="preserve">
<value>נכשל אימות שלמות מטמון ה-STD העולמי. זה מרמז על פגיעה פוטנציאלית בקובץ/זיכרון, במקום זה הוא יאותחל מחדש.</value>
</data>
</root>

View File

@@ -101,13 +101,22 @@
<value>Ricezione di tutti i depositi per un totale di {0} app...</value>
<comment>{0} will be replaced by the number (total count) of apps being retrieved</comment>
</data>
<data name="BotRetrievingAppInfos" xml:space="preserve">
<value>Recuperate {0} informazioni app...</value>
<comment>{0} will be replaced by the number (count this batch) of app infos being retrieved</comment>
</data>
<data name="BotFinishedRetrievingAppInfos" xml:space="preserve">
<value>Hai completato il recupero di {0} informazioni app.</value>
<comment>{0} will be replaced by the number (count this batch) of app infos retrieved</comment>
</data>
<data name="BotRetrievingDepotKeys" xml:space="preserve">
<value>Recupero {0} chiavi...</value>
<comment>{0} will be replaced by the number (count this batch) of depot keys being retrieved</comment>
</data>
<data name="BotFinishedRetrievingDepotKeys" xml:space="preserve">
<value>Completato il recupero di {0} chiavi.</value>
<comment>{0} will be replaced by the number (count this batch) of depot keys retrieved</comment>
</data>
<data name="BotFinishedRetrievingTotalDepots" xml:space="preserve">
<value>Finito il recupero di tutte le chiavi del deposito per un totale di {0} applicazioni.</value>
<comment>{0} will be replaced by the number (total count) of apps retrieved</comment>
@@ -143,8 +152,29 @@
<value>Nuovi pacchetti: {0}</value>
<comment>{0} will be replaced by list of the packages (IDs, numbers), separated by a comma</comment>
</data>
<data name="SubmissionSuccessfulVerifiedPackages" xml:space="preserve">
<value>Pacchetti verificati: {0}</value>
<comment>{0} will be replaced by list of the packages (IDs, numbers), separated by a comma</comment>
</data>
<data name="SubmissionSuccessfulNewDepots" xml:space="preserve">
<value>Nuove app: {0}</value>
<comment>{0} will be replaced by list of the depots (IDs, numbers), separated by a comma</comment>
</data>
<data name="SubmissionSuccessfulVerifiedDepots" xml:space="preserve">
<value>App verificate: {0}</value>
<comment>{0} will be replaced by list of the depots (IDs, numbers), separated by a comma</comment>
</data>
<data name="PluginSecretListInitialized" xml:space="preserve">
<value>{0} inizializzato, il plugin non risolverà nessuno dei seguenti: {1}.</value>
<comment>{0} will be replaced by the name of the config property (e.g. "SecretPackageIDs"), {1} will be replaced by list of the objects (IDs, numbers), separated by a comma</comment>
</data>
<data name="LoadingGlobalCache" xml:space="preserve">
<value>Caricamento cache globale STD...</value>
</data>
<data name="ValidatingGlobalCacheIntegrity" xml:space="preserve">
<value>Convalida integrità cache globale STD...</value>
</data>
<data name="GlobalCacheIntegrityValidationFailed" xml:space="preserve">
<value>Impossibile verificare l'integrità globale della cache STD. Questo suggerisce un potenziale danneggiamento di file/memoria, una nuova istanza verrà inizializzata.</value>
</data>
</root>

View File

@@ -62,31 +62,87 @@
PublicKeyToken=b77a5c561934e089
</value>
</resheader>
<data name="PluginDisabledMissingBuildToken" xml:space="preserve">
<value>{0} buvo išjungtas, dėl trūkstamos dalies</value>
<comment>{0} will be replaced by the name of the plugin (e.g. "SteamTokenDumperPlugin")</comment>
</data>
<data name="PluginInitializedAndEnabled" xml:space="preserve">
<value>{0} buvo sėkmingai įrašytas, dėkojame už jūsų pagalbą. Pirma pateiktis įvyks už maždaug {1} nuo dabar.</value>
<comment>{0} will be replaced by the name of the plugin (e.g. "SteamTokenDumperPlugin"), {1} will be replaced by translated TimeSpan string (such as "53 minutes")</comment>
</data>
<data name="FileCouldNotBeLoadedFreshInit" xml:space="preserve">
<value>{0} nepavyko užkrauti, bus įrašyta nauja instancija...</value>
<comment>{0} will be replaced by the name of the file (e.g. "GlobalCache")</comment>
</data>
<data name="BotNoAppsToRefresh" xml:space="preserve">
<value>Šiame robote nėra jokių programų, kurias reikėtų atnaujinti.</value>
</data>
<data name="BotRetrievingTotalAppAccessTokens" xml:space="preserve">
<value>Iš viso gaunama {0} programos prieigos raktų...</value>
<comment>{0} will be replaced by the number (total count) of app access tokens being retrieved</comment>
</data>
<data name="BotRetrievingAppAccessTokens" xml:space="preserve">
<value>Gaunama {0} programos prieigos raktų...</value>
<comment>{0} will be replaced by the number (count this batch) of app access tokens being retrieved</comment>
</data>
<data name="BotFinishedRetrievingAppAccessTokens" xml:space="preserve">
<value>Baigta gauti {0} programos prieigos raktų.</value>
<comment>{0} will be replaced by the number (count this batch) of app access tokens retrieved</comment>
</data>
<data name="BotFinishedRetrievingTotalAppAccessTokens" xml:space="preserve">
<value>Iš viso baigta gauti {0} programos prieigos raktų.</value>
<comment>{0} will be replaced by the number (total count) of app access tokens retrieved</comment>
</data>
<data name="BotRetrievingAppInfos" xml:space="preserve">
<value>Gaunama {0} programos informacijos...</value>
<comment>{0} will be replaced by the number (count this batch) of app infos being retrieved</comment>
</data>
<data name="BotFinishedRetrievingAppInfos" xml:space="preserve">
<value>Baigta gauti {0} programos informacijos.</value>
<comment>{0} will be replaced by the number (count this batch) of app infos retrieved</comment>
</data>
<data name="SubmissionNoNewData" xml:space="preserve">
<value>Nėra jokių naujų duomenų, kuriuos būtų galima pateikti, viskas jau atnaujinta.</value>
</data>
<data name="SubmissionFailedTooManyRequests" xml:space="preserve">
<value>Pateiktis nepavyko dėl per daug išsiustų prašymų, pradėsime iš naujo už maždaug {0} nuo dabar.</value>
<comment>{0} will be replaced by translated TimeSpan string (such as "53 minutes")</comment>
</data>
<data name="SubmissionSuccessfulNewApps" xml:space="preserve">
<value>Naujos programos: {0}</value>
<comment>{0} will be replaced by list of the apps (IDs, numbers), separated by a comma</comment>
</data>
<data name="SubmissionSuccessfulVerifiedApps" xml:space="preserve">
<value>Patvirtintos programos: {0}</value>
<comment>{0} will be replaced by list of the apps (IDs, numbers), separated by a comma</comment>
</data>
<data name="SubmissionSuccessfulNewPackages" xml:space="preserve">
<value>Nauji paketai: {0}</value>
<comment>{0} will be replaced by list of the packages (IDs, numbers), separated by a comma</comment>
</data>
<data name="SubmissionSuccessfulVerifiedPackages" xml:space="preserve">
<value>Patvirtinti paketai: {0}</value>
<comment>{0} will be replaced by list of the packages (IDs, numbers), separated by a comma</comment>
</data>
<data name="PluginSecretListInitialized" xml:space="preserve">
<value>{0} inicijuota, įskiepis neišspręs nė vieno iš šių dalykų: {1}.</value>
<comment>{0} will be replaced by the name of the config property (e.g. "SecretPackageIDs"), {1} will be replaced by list of the objects (IDs, numbers), separated by a comma</comment>
</data>
<data name="LoadingGlobalCache" xml:space="preserve">
<value>Kraunama STD global talpykla...</value>
</data>
<data name="ValidatingGlobalCacheIntegrity" xml:space="preserve">
<value>Tvirtinamas STD global talpyklos vientisumas...</value>
</data>
</root>

View File

@@ -82,7 +82,22 @@
<data name="SubmissionSuccessfulNewApps" xml:space="preserve">
<value>Jaunas aplikācijas: {0}</value>
<comment>{0} will be replaced by list of the apps (IDs, numbers), separated by a comma</comment>
</data>
<data name="SubmissionSuccessfulVerifiedApps" xml:space="preserve">
<value>Pārbaudītas aplikācijas: {0}</value>
<comment>{0} will be replaced by list of the apps (IDs, numbers), separated by a comma</comment>
</data>
<data name="SubmissionSuccessfulNewPackages" xml:space="preserve">
<value>Jaunas pakas: {0}</value>
<comment>{0} will be replaced by list of the packages (IDs, numbers), separated by a comma</comment>
</data>
<data name="SubmissionSuccessfulVerifiedPackages" xml:space="preserve">
<value>Pārbaudītas pakas: {0}</value>
<comment>{0} will be replaced by list of the packages (IDs, numbers), separated by a comma</comment>
</data>

View File

@@ -168,4 +168,13 @@
<value>{0} zainicjowano, wtyczka nie rozwiąże żadnego z tych: {1}.</value>
<comment>{0} will be replaced by the name of the config property (e.g. "SecretPackageIDs"), {1} will be replaced by list of the objects (IDs, numbers), separated by a comma</comment>
</data>
<data name="LoadingGlobalCache" xml:space="preserve">
<value>Ładowanie globalnej pamięci podręcznej STD...</value>
</data>
<data name="ValidatingGlobalCacheIntegrity" xml:space="preserve">
<value>Sprawdzanie integralność globalnej pamięci podręcznej STD...</value>
</data>
<data name="GlobalCacheIntegrityValidationFailed" xml:space="preserve">
<value>Nie udało się zweryfikować integralności globalnej pamięci podręcznej STD. Sugeruje to potencjalne uszkodzenie pliku/pamięci, zamiast tego zostanie zainicjowana nowa instancja.</value>
</data>
</root>

View File

@@ -63,42 +63,42 @@
</value>
</resheader>
<data name="PluginDisabledMissingBuildToken" xml:space="preserve">
<value>{0} foi desativado devido à falta de um token de compilação</value>
<value>O {0} foi desativado devido a um token de compilação ausente</value>
<comment>{0} will be replaced by the name of the plugin (e.g. "SteamTokenDumperPlugin")</comment>
</data>
<data name="PluginDisabledInConfig" xml:space="preserve">
<value>{0} está desativado de acordo com sua configuração. Se você gostaria de ajudar o SteamDB no envio de dados, por favor, confira nosso wiki.</value>
<value>O {0} está desativado de acordo com a sua configuração. Caso deseje ajudar o SteamDB com o envio de informações, dê uma olhada na nossa wiki.</value>
<comment>{0} will be replaced by the name of the plugin (e.g. "SteamTokenDumperPlugin")</comment>
</data>
<data name="PluginInitializedAndEnabled" xml:space="preserve">
<value>{0} foi inicializado com sucesso, obrigado antecipadamente pela sua ajuda. O primeiro envio ocorrerá em aproximadamente {1} a partir de agora.</value>
<value>O {0} foi inicializado com sucesso, agradecemos a sua ajuda. O primeiro envio ocorrerá em aproximadamente {1}.</value>
<comment>{0} will be replaced by the name of the plugin (e.g. "SteamTokenDumperPlugin"), {1} will be replaced by translated TimeSpan string (such as "53 minutes")</comment>
</data>
<data name="FileCouldNotBeLoadedFreshInit" xml:space="preserve">
<value>{0} não pôde ser carregado, uma instância nova será inicializada...</value>
<value>O {0} não pôde ser carregado, uma instância nova será inicializada...</value>
<comment>{0} will be replaced by the name of the file (e.g. "GlobalCache")</comment>
</data>
<data name="BotNoAppsToRefresh" xml:space="preserve">
<value>Não há aplicativos que necessitem de ser atualizados nesta instância de bot.</value>
<value>Não há aplicativos que exijam atualizações na instância atual.</value>
</data>
<data name="BotRetrievingTotalAppAccessTokens" xml:space="preserve">
<value>Recuperando um total de {0} tokens de acesso a aplicativos...</value>
<value>Recuperando um total de {0} tokens de acesso para aplicativos...</value>
<comment>{0} will be replaced by the number (total count) of app access tokens being retrieved</comment>
</data>
<data name="BotRetrievingAppAccessTokens" xml:space="preserve">
<value>Recuperando {0} tokens de acesso a aplicativos...</value>
<value>Recuperando {0} tokens...</value>
<comment>{0} will be replaced by the number (count this batch) of app access tokens being retrieved</comment>
</data>
<data name="BotFinishedRetrievingAppAccessTokens" xml:space="preserve">
<value>Concluímos a recuperação de {0} tokens de acesso ao aplicativo.</value>
<value>Recuperamos {0} tokens.</value>
<comment>{0} will be replaced by the number (count this batch) of app access tokens retrieved</comment>
</data>
<data name="BotFinishedRetrievingTotalAppAccessTokens" xml:space="preserve">
<value>Obtivemos um total de {0} tokens de acesso aos aplicativos.</value>
<value>Recuperamos um total de {0} tokens de acesso.</value>
<comment>{0} will be replaced by the number (total count) of app access tokens retrieved</comment>
</data>
<data name="BotRetrievingTotalDepots" xml:space="preserve">
<value>Recuperando todos os depósitos por um total de {0} apps...</value>
<value>Recuperando depots para todos os {0} aplicativos...</value>
<comment>{0} will be replaced by the number (total count) of apps being retrieved</comment>
</data>
<data name="BotRetrievingAppInfos" xml:space="preserve">
@@ -106,38 +106,38 @@
<comment>{0} will be replaced by the number (count this batch) of app infos being retrieved</comment>
</data>
<data name="BotFinishedRetrievingAppInfos" xml:space="preserve">
<value>Concluímos a recuperação de {0} informações de aplicativo.</value>
<value>Recuperamos um total de {0} informações de aplicativos.</value>
<comment>{0} will be replaced by the number (count this batch) of app infos retrieved</comment>
</data>
<data name="BotRetrievingDepotKeys" xml:space="preserve">
<value>Recuperando {0} chaves de depósito...</value>
<value>Recuperando {0} códigos de depots...</value>
<comment>{0} will be replaced by the number (count this batch) of depot keys being retrieved</comment>
</data>
<data name="BotFinishedRetrievingDepotKeys" xml:space="preserve">
<value>Terminamos de recuperar {0} chaves de depósito.</value>
<value>Recuperamos códigos para {0} depots.</value>
<comment>{0} will be replaced by the number (count this batch) of depot keys retrieved</comment>
</data>
<data name="BotFinishedRetrievingTotalDepots" xml:space="preserve">
<value>Terminamos de recuperar todas as chaves de depósito para um total de {0} apps.</value>
<value>Recuperamos códigos de acesso para {0} aplicativos.</value>
<comment>{0} will be replaced by the number (total count) of apps retrieved</comment>
</data>
<data name="SubmissionNoNewData" xml:space="preserve">
<value>Não há novos dados para enviar, tudo está atualizado.</value>
<value>Não há novos dados a serem enviados. Tudo está atualizado.</value>
</data>
<data name="SubmissionNoContributorSet" xml:space="preserve">
<value>Não foi possível enviar os dados porque não há um conjunto SteamID válido que possamos classificar como colaborador. Considere configurar a propriedade {0}.</value>
<value>Não foi possível enviar os dados porque não conseguimos identificar um ID Steam válido para definir como colaborador. Considere configurar a propriedade "{0}".</value>
<comment>{0} will be replaced by the name of the config property (e.g. "SteamOwnerID") that the user is expected to set</comment>
</data>
<data name="SubmissionInProgress" xml:space="preserve">
<value>Enviando um total de apps/pacotes/pacotes registrados: {0}/{1}/{2}...</value>
<value>Enviando um total de {0} aplicativos, {1} pacotes e {2} depots registrados...</value>
<comment>{0} will be replaced by the number of app access tokens being submitted, {1} will be replaced by the number of package access tokens being submitted, {2} will be replaced by the number of depot keys being submitted</comment>
</data>
<data name="SubmissionFailedTooManyRequests" xml:space="preserve">
<value>O envio falhou devido a muitas solicitações enviadas, tentaremos novamente em aproximadamente {0} a partir de agora.</value>
<value>O envio falhou porque muitas solicitações foram enviadas pelo cliente. Tentaremos novamente em aproximadamente {0}.</value>
<comment>{0} will be replaced by translated TimeSpan string (such as "53 minutes")</comment>
</data>
<data name="SubmissionSuccessful" xml:space="preserve">
<value>Os dados foram enviados com sucesso. O servidor registrou um total de novos aplicativos/pacotes/depósitos: {0} ({1} verificado)/{2} ({3} verificado)/{4} ({5} verificado).</value>
<value>Os dados foram enviados com sucesso. O servidor registrou um total de {0} aplicativos ({1} verificados), {2} pacotes ({3} verificados) e {4} depots ({5} verificados).</value>
<comment>{0} will be replaced by the number of new app access tokens that the server has registered, {1} will be replaced by the number of verified app access tokens that the server has registered, {2} will be replaced by the number of new package access tokens that the server has registered, {3} will be replaced by the number of verified package access tokens that the server has registered, {4} will be replaced by the number of new depot keys that the server has registered, {5} will be replaced by the number of verified depot keys that the server has registered</comment>
</data>
<data name="SubmissionSuccessfulNewApps" xml:space="preserve">
@@ -157,15 +157,24 @@
<comment>{0} will be replaced by list of the packages (IDs, numbers), separated by a comma</comment>
</data>
<data name="SubmissionSuccessfulNewDepots" xml:space="preserve">
<value>Novos depósitos: {0}</value>
<value>Novos depots: {0}</value>
<comment>{0} will be replaced by list of the depots (IDs, numbers), separated by a comma</comment>
</data>
<data name="SubmissionSuccessfulVerifiedDepots" xml:space="preserve">
<value>Depósitos verificados: {0}</value>
<value>Depots verificados: {0}</value>
<comment>{0} will be replaced by list of the depots (IDs, numbers), separated by a comma</comment>
</data>
<data name="PluginSecretListInitialized" xml:space="preserve">
<value>{0} inicializado, o plugin não resolverá nenhum desses: {1}.</value>
<value>{0} inicializado, o plugin ignorará os seguintes pacotes: {1}.</value>
<comment>{0} will be replaced by the name of the config property (e.g. "SecretPackageIDs"), {1} will be replaced by list of the objects (IDs, numbers), separated by a comma</comment>
</data>
<data name="LoadingGlobalCache" xml:space="preserve">
<value>Carregando cache global do STD...</value>
</data>
<data name="ValidatingGlobalCacheIntegrity" xml:space="preserve">
<value>Validando integridade do cache global do STD...</value>
</data>
<data name="GlobalCacheIntegrityValidationFailed" xml:space="preserve">
<value>Falha ao verificar a integridade do cache global do STD. Isto pode indicar uma possível corrupção de arquivo/memória, uma nova instância será inicializada.</value>
</data>
</root>

View File

@@ -168,4 +168,13 @@
<value>{0} INITIALIZD, TEH PLUGIN WILL NOT RESOLVE ANY OV DOSE: {1}.</value>
<comment>{0} will be replaced by the name of the config property (e.g. "SecretPackageIDs"), {1} will be replaced by list of the objects (IDs, numbers), separated by a comma</comment>
</data>
<data name="LoadingGlobalCache" xml:space="preserve">
<value>LOADIN STD GLOBAL CACHE...</value>
</data>
<data name="ValidatingGlobalCacheIntegrity" xml:space="preserve">
<value>VALIDATIN STD GLOBAL CACHE INTEGRITY...</value>
</data>
<data name="GlobalCacheIntegrityValidationFailed" xml:space="preserve">
<value>FAILD 2 VERIFY STD GLOBAL CACHE INTEGRITY. DIS SUGGESTS POTENTIAL FILE/MEMS CORRUPSHUN, FRESH INSTANCE WILL BE INITIALIZD INSTEAD.</value>
</data>
</root>

View File

@@ -168,4 +168,13 @@
<value>{0} initialized, the plugin will not resolve any of those: {1}.</value>
<comment>{0} will be replaced by the name of the config property (e.g. "SecretPackageIDs"), {1} will be replaced by list of the objects (IDs, numbers), separated by a comma</comment>
</data>
<data name="LoadingGlobalCache" xml:space="preserve">
<value>Loading STD global cache...</value>
</data>
<data name="ValidatingGlobalCacheIntegrity" xml:space="preserve">
<value>Validating STD global cache integrity...</value>
</data>
<data name="GlobalCacheIntegrityValidationFailed" xml:space="preserve">
<value>Failed to verify STD global cache integrity. This suggests a potential file/memory corruption, a fresh instance will be initialized instead.</value>
</data>
</root>

View File

@@ -168,4 +168,13 @@
<value>{0} инициализирован, плагин не взаимодействует ни с одним из их: {1}.</value>
<comment>{0} will be replaced by the name of the config property (e.g. "SecretPackageIDs"), {1} will be replaced by list of the objects (IDs, numbers), separated by a comma</comment>
</data>
<data name="LoadingGlobalCache" xml:space="preserve">
<value>Загрузка глобального кэша STD...</value>
</data>
<data name="ValidatingGlobalCacheIntegrity" xml:space="preserve">
<value>Проверка целостности глобального кэша STD...</value>
</data>
<data name="GlobalCacheIntegrityValidationFailed" xml:space="preserve">
<value>Не удалось проверить целостность глобального кэша STD. Это говорит о потенциальном повреждении файла/памяти, вместо этого будет инициализирован новый экземпляр.</value>
</data>
</root>

View File

@@ -168,4 +168,7 @@
<value>{0} inicializovaných, modul nebude pracovať so žiadnym: {1}.</value>
<comment>{0} will be replaced by the name of the config property (e.g. "SecretPackageIDs"), {1} will be replaced by list of the objects (IDs, numbers), separated by a comma</comment>
</data>
</root>

View File

@@ -168,4 +168,13 @@
<value>{0} başlatıldı, eklenti şunlardan hiçbirini çözemedi: {1}.</value>
<comment>{0} will be replaced by the name of the config property (e.g. "SecretPackageIDs"), {1} will be replaced by list of the objects (IDs, numbers), separated by a comma</comment>
</data>
<data name="LoadingGlobalCache" xml:space="preserve">
<value>STD küresel önbelleği yükleniyor...</value>
</data>
<data name="ValidatingGlobalCacheIntegrity" xml:space="preserve">
<value>STD küresel önbellek bütünlüğü doğrulanıyor...</value>
</data>
<data name="GlobalCacheIntegrityValidationFailed" xml:space="preserve">
<value>STD küresel önbellek bütünlüğü doğrulanamadı. Bu, olası bir dosya/bellek bozulması olduğunu gösterir, bunun yerine yeni bir örnek başlatılacaktır.</value>
</data>
</root>

View File

@@ -168,4 +168,13 @@
<value>{0} đã được khởi tạo, plugin sẽ không can thiệp với những thứ sau: {1}.</value>
<comment>{0} will be replaced by the name of the config property (e.g. "SecretPackageIDs"), {1} will be replaced by list of the objects (IDs, numbers), separated by a comma</comment>
</data>
<data name="LoadingGlobalCache" xml:space="preserve">
<value>Đang tải bộ nhớ đệm STD chung...</value>
</data>
<data name="ValidatingGlobalCacheIntegrity" xml:space="preserve">
<value>Đang kiểm tra trạng thái bộ nhớ đệm STD chung...</value>
</data>
<data name="GlobalCacheIntegrityValidationFailed" xml:space="preserve">
<value>Không thể xác minh trạng thái bộ nhớ đệm chung STD. Điều này có khả năng do tệp/bộ nhớ bị hỏng, một trạng thái mới sẽ được khởi tạo thay thế.</value>
</data>
</root>

View File

@@ -168,4 +168,13 @@
<value>{0} 已初始化,插件无法解析以下任何内容:{1}。</value>
<comment>{0} will be replaced by the name of the config property (e.g. "SecretPackageIDs"), {1} will be replaced by list of the objects (IDs, numbers), separated by a comma</comment>
</data>
<data name="LoadingGlobalCache" xml:space="preserve">
<value>正在加载 STD 全局缓存……</value>
</data>
<data name="ValidatingGlobalCacheIntegrity" xml:space="preserve">
<value>正在验证 STD 全局缓存完整性……</value>
</data>
<data name="GlobalCacheIntegrityValidationFailed" xml:space="preserve">
<value>验证 STD 全局缓存完整性失败。这意味着潜在的文件或内存损坏,即将初始化新实例作为替代。</value>
</data>
</root>

View File

@@ -0,0 +1,180 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns="" id="root">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace"/>
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0"/>
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string"/>
<xsd:attribute name="type" type="xsd:string"/>
<xsd:attribute name="mimetype" type="xsd:string"/>
<xsd:attribute ref="xml:space"/>
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string"/>
<xsd:attribute name="name" type="xsd:string"/>
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1"/>
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2"/>
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1"/>
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3"/>
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4"/>
<xsd:attribute ref="xml:space"/>
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1"/>
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required"/>
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089
</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089
</value>
</resheader>
<data name="PluginDisabledMissingBuildToken" xml:space="preserve">
<value>由於 {0} 缺少組建權杖而被停用</value>
<comment>{0} will be replaced by the name of the plugin (e.g. "SteamTokenDumperPlugin")</comment>
</data>
<data name="PluginDisabledInConfig" xml:space="preserve">
<value>目前 {0} 已根據您的設定被停用。如果您想幫助 SteamDB 提交資料,請查看我們的 Wiki。</value>
<comment>{0} will be replaced by the name of the plugin (e.g. "SteamTokenDumperPlugin")</comment>
</data>
<data name="PluginInitializedAndEnabled" xml:space="preserve">
<value>已成功初始化 {0},先感謝您的幫助。第一次提交將大約在 {1} 後進行。</value>
<comment>{0} will be replaced by the name of the plugin (e.g. "SteamTokenDumperPlugin"), {1} will be replaced by translated TimeSpan string (such as "53 minutes")</comment>
</data>
<data name="FileCouldNotBeLoadedFreshInit" xml:space="preserve">
<value>無法載入 {0},將初始化一個新實例…</value>
<comment>{0} will be replaced by the name of the file (e.g. "GlobalCache")</comment>
</data>
<data name="BotNoAppsToRefresh" xml:space="preserve">
<value>此 Bot 中沒有需要再刷新的應用程式。</value>
</data>
<data name="BotRetrievingTotalAppAccessTokens" xml:space="preserve">
<value>正在檢索共 {0} 個應用程式存取權杖…</value>
<comment>{0} will be replaced by the number (total count) of app access tokens being retrieved</comment>
</data>
<data name="BotRetrievingAppAccessTokens" xml:space="preserve">
<value>正在檢索 {0} 個應用程式存取權杖…</value>
<comment>{0} will be replaced by the number (count this batch) of app access tokens being retrieved</comment>
</data>
<data name="BotFinishedRetrievingAppAccessTokens" xml:space="preserve">
<value>已完成檢索 {0} 個應用程式存取權杖。</value>
<comment>{0} will be replaced by the number (count this batch) of app access tokens retrieved</comment>
</data>
<data name="BotFinishedRetrievingTotalAppAccessTokens" xml:space="preserve">
<value>已完成檢索共 {0} 個應用程式存取權杖。</value>
<comment>{0} will be replaced by the number (total count) of app access tokens retrieved</comment>
</data>
<data name="BotRetrievingTotalDepots" xml:space="preserve">
<value>正在檢索共 {0} 個應用程式的 Depot…</value>
<comment>{0} will be replaced by the number (total count) of apps being retrieved</comment>
</data>
<data name="BotRetrievingAppInfos" xml:space="preserve">
<value>正在檢索 {0} 個應用程式資料…</value>
<comment>{0} will be replaced by the number (count this batch) of app infos being retrieved</comment>
</data>
<data name="BotFinishedRetrievingAppInfos" xml:space="preserve">
<value>已完成檢索 {0} 個應用程式資料。</value>
<comment>{0} will be replaced by the number (count this batch) of app infos retrieved</comment>
</data>
<data name="BotRetrievingDepotKeys" xml:space="preserve">
<value>正在檢索 {0} 個應用程式的 Depot 金鑰…</value>
<comment>{0} will be replaced by the number (count this batch) of depot keys being retrieved</comment>
</data>
<data name="BotFinishedRetrievingDepotKeys" xml:space="preserve">
<value>已完成檢索 {0} 個應用程式的 Depot 金鑰。</value>
<comment>{0} will be replaced by the number (count this batch) of depot keys retrieved</comment>
</data>
<data name="BotFinishedRetrievingTotalDepots" xml:space="preserve">
<value>已完成檢索共 {0} 個應用程式的 Depot 金鑰。</value>
<comment>{0} will be replaced by the number (total count) of apps retrieved</comment>
</data>
<data name="SubmissionNoNewData" xml:space="preserve">
<value>沒有要提交的新資料,一切都是最新狀態。</value>
</data>
<data name="SubmissionNoContributorSet" xml:space="preserve">
<value>無法提交資料,因為沒有可以讓我們歸類為貢獻者的有效 SteamID 集。 考慮設定 {0} 屬性。</value>
<comment>{0} will be replaced by the name of the config property (e.g. "SteamOwnerID") that the user is expected to set</comment>
</data>
<data name="SubmissionInProgress" xml:space="preserve">
<value>正在提交註冊的應用程式/程式包/Depot 共:{0}/{1}/{2}…</value>
<comment>{0} will be replaced by the number of app access tokens being submitted, {1} will be replaced by the number of package access tokens being submitted, {2} will be replaced by the number of depot keys being submitted</comment>
</data>
<data name="SubmissionFailedTooManyRequests" xml:space="preserve">
<value>由於發送的請求過多導致提交失敗,我們將在約 {0} 後重試。</value>
<comment>{0} will be replaced by translated TimeSpan string (such as "53 minutes")</comment>
</data>
<data name="SubmissionSuccessful" xml:space="preserve">
<value>已成功提交資料。伺服器共已註冊了新的應用程式/程式包/Depot 共:{0} ({1} 個已驗證)/{2} ({3} 個已驗證)/{4} ({5} 個已驗證)。</value>
<comment>{0} will be replaced by the number of new app access tokens that the server has registered, {1} will be replaced by the number of verified app access tokens that the server has registered, {2} will be replaced by the number of new package access tokens that the server has registered, {3} will be replaced by the number of verified package access tokens that the server has registered, {4} will be replaced by the number of new depot keys that the server has registered, {5} will be replaced by the number of verified depot keys that the server has registered</comment>
</data>
<data name="SubmissionSuccessfulNewApps" xml:space="preserve">
<value>新的應用程式:{0}</value>
<comment>{0} will be replaced by list of the apps (IDs, numbers), separated by a comma</comment>
</data>
<data name="SubmissionSuccessfulVerifiedApps" xml:space="preserve">
<value>已驗證的應用程式:{0}</value>
<comment>{0} will be replaced by list of the apps (IDs, numbers), separated by a comma</comment>
</data>
<data name="SubmissionSuccessfulNewPackages" xml:space="preserve">
<value>新的程式包:{0}</value>
<comment>{0} will be replaced by list of the packages (IDs, numbers), separated by a comma</comment>
</data>
<data name="SubmissionSuccessfulVerifiedPackages" xml:space="preserve">
<value>已驗證的程式包:{0}</value>
<comment>{0} will be replaced by list of the packages (IDs, numbers), separated by a comma</comment>
</data>
<data name="SubmissionSuccessfulNewDepots" xml:space="preserve">
<value>新的 Depot{0}</value>
<comment>{0} will be replaced by list of the depots (IDs, numbers), separated by a comma</comment>
</data>
<data name="SubmissionSuccessfulVerifiedDepots" xml:space="preserve">
<value>已被驗證的 Depot{0}</value>
<comment>{0} will be replaced by list of the depots (IDs, numbers), separated by a comma</comment>
</data>
<data name="PluginSecretListInitialized" xml:space="preserve">
<value>{0} 已被初始化,外掛程式將無法解析其中任何一個:{1}。</value>
<comment>{0} will be replaced by the name of the config property (e.g. "SecretPackageIDs"), {1} will be replaced by list of the objects (IDs, numbers), separated by a comma</comment>
</data>
<data name="LoadingGlobalCache" xml:space="preserve">
<value>正在載入 STD 全域快取…</value>
</data>
<data name="ValidatingGlobalCacheIntegrity" xml:space="preserve">
<value>正在驗證 STD 全域快取完整性…</value>
</data>
<data name="GlobalCacheIntegrityValidationFailed" xml:space="preserve">
<value>無法驗證 STD 全域快取完整性。這表示可能有檔案/記憶損壞,將初始化一個新實例。</value>
</data>
</root>

View File

@@ -1,92 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns="" id="root">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace"/>
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0"/>
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string"/>
<xsd:attribute name="type" type="xsd:string"/>
<xsd:attribute name="mimetype" type="xsd:string"/>
<xsd:attribute ref="xml:space"/>
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string"/>
<xsd:attribute name="name" type="xsd:string"/>
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1"/>
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2"/>
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1"/>
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3"/>
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4"/>
<xsd:attribute ref="xml:space"/>
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1"/>
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required"/>
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089
</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089
</value>
</resheader>
</root>

View File

@@ -4,7 +4,7 @@
// / ___ \ | | | (__ | | | || | ___) || |_| __/| (_| || | | | | || _|| (_| || | | | | | | |
// /_/ \_\|_| \___||_| |_||_||____/ \__|\___| \__,_||_| |_| |_||_| \__,_||_| |_| |_| |_|
// |
// Copyright 2015-2021 Łukasz "JustArchi" Domeradzki
// Copyright 2015-2022 Łukasz "JustArchi" Domeradzki
// Contact: JustArchi@JustArchi.net
// |
// Licensed under the Apache License, Version 2.0 (the "License");
@@ -30,27 +30,27 @@ using SteamKit2;
namespace ArchiSteamFarm.OfficialPlugins.SteamTokenDumper;
internal sealed class RequestData {
[JsonProperty(PropertyName = "guid", Required = Required.Always)]
[JsonProperty("guid", Required = Required.Always)]
private static string Guid => ASF.GlobalDatabase?.Identifier.ToString("N") ?? throw new InvalidOperationException(nameof(ASF.GlobalDatabase.Identifier));
[JsonProperty(PropertyName = "token", Required = Required.Always)]
[JsonProperty("token", Required = Required.Always)]
private static string Token => SharedInfo.Token;
[JsonProperty(PropertyName = "v", Required = Required.Always)]
[JsonProperty("v", Required = Required.Always)]
private static byte Version => SharedInfo.ApiVersion;
[JsonProperty(PropertyName = "apps", Required = Required.Always)]
[JsonProperty("apps", Required = Required.Always)]
private readonly ImmutableDictionary<string, string> Apps;
[JsonProperty(PropertyName = "depots", Required = Required.Always)]
[JsonProperty("depots", Required = Required.Always)]
private readonly ImmutableDictionary<string, string> Depots;
private readonly ulong SteamID;
[JsonProperty(PropertyName = "subs", Required = Required.Always)]
[JsonProperty("subs", Required = Required.Always)]
private readonly ImmutableDictionary<string, string> Subs;
[JsonProperty(PropertyName = "steamid", Required = Required.Always)]
[JsonProperty("steamid", Required = Required.Always)]
private string SteamIDText => new SteamID(SteamID).Render();
internal RequestData(ulong steamID, IReadOnlyCollection<KeyValuePair<uint, ulong>> apps, IReadOnlyCollection<KeyValuePair<uint, ulong>> accessTokens, IReadOnlyCollection<KeyValuePair<uint, string>> depots) {
@@ -58,17 +58,9 @@ internal sealed class RequestData {
throw new ArgumentOutOfRangeException(nameof(steamID));
}
if (apps == null) {
throw new ArgumentNullException(nameof(apps));
}
if (accessTokens == null) {
throw new ArgumentNullException(nameof(accessTokens));
}
if (depots == null) {
throw new ArgumentNullException(nameof(depots));
}
ArgumentNullException.ThrowIfNull(apps);
ArgumentNullException.ThrowIfNull(accessTokens);
ArgumentNullException.ThrowIfNull(depots);
SteamID = steamID;

View File

@@ -4,7 +4,7 @@
// / ___ \ | | | (__ | | | || | ___) || |_| __/| (_| || | | | | || _|| (_| || | | | | | | |
// /_/ \_\|_| \___||_| |_||_||____/ \__|\___| \__,_||_| |_| |_||_| \__,_||_| |_| |_| |_|
// |
// Copyright 2015-2021 Łukasz "JustArchi" Domeradzki
// Copyright 2015-2022 Łukasz "JustArchi" Domeradzki
// Contact: JustArchi@JustArchi.net
// |
// Licensed under the Apache License, Version 2.0 (the "License");
@@ -29,12 +29,12 @@ namespace ArchiSteamFarm.OfficialPlugins.SteamTokenDumper;
[SuppressMessage("ReSharper", "ClassCannotBeInstantiated")]
internal sealed class ResponseData {
#pragma warning disable CS0649 // False positive, the field is used during json deserialization
[JsonProperty(PropertyName = "data", Required = Required.DisallowNull)]
[JsonProperty("data", Required = Required.DisallowNull)]
internal readonly InternalData? Data;
#pragma warning restore CS0649 // False positive, the field is used during json deserialization
#pragma warning disable CS0649 // False positive, the field is used during json deserialization
[JsonProperty(PropertyName = "success", Required = Required.Always)]
[JsonProperty("success", Required = Required.Always)]
internal readonly bool Success;
#pragma warning restore CS0649 // False positive, the field is used during json deserialization
@@ -42,22 +42,22 @@ internal sealed class ResponseData {
private ResponseData() { }
internal sealed class InternalData {
[JsonProperty(PropertyName = "new_apps", Required = Required.Always)]
[JsonProperty("new_apps", Required = Required.Always)]
internal readonly ImmutableHashSet<uint> NewApps = ImmutableHashSet<uint>.Empty;
[JsonProperty(PropertyName = "new_depots", Required = Required.Always)]
[JsonProperty("new_depots", Required = Required.Always)]
internal readonly ImmutableHashSet<uint> NewDepots = ImmutableHashSet<uint>.Empty;
[JsonProperty(PropertyName = "new_subs", Required = Required.Always)]
[JsonProperty("new_subs", Required = Required.Always)]
internal readonly ImmutableHashSet<uint> NewPackages = ImmutableHashSet<uint>.Empty;
[JsonProperty(PropertyName = "verified_apps", Required = Required.Always)]
[JsonProperty("verified_apps", Required = Required.Always)]
internal readonly ImmutableHashSet<uint> VerifiedApps = ImmutableHashSet<uint>.Empty;
[JsonProperty(PropertyName = "verified_depots", Required = Required.Always)]
[JsonProperty("verified_depots", Required = Required.Always)]
internal readonly ImmutableHashSet<uint> VerifiedDepots = ImmutableHashSet<uint>.Empty;
[JsonProperty(PropertyName = "verified_subs", Required = Required.Always)]
[JsonProperty("verified_subs", Required = Required.Always)]
internal readonly ImmutableHashSet<uint> VerifiedPackages = ImmutableHashSet<uint>.Empty;
[JsonConstructor]

View File

@@ -4,7 +4,7 @@
// / ___ \ | | | (__ | | | || | ___) || |_| __/| (_| || | | | | || _|| (_| || | | | | | | |
// /_/ \_\|_| \___||_| |_||_||____/ \__|\___| \__,_||_| |_| |_||_| \__,_||_| |_| |_| |_|
// |
// Copyright 2015-2021 Łukasz "JustArchi" Domeradzki
// Copyright 2015-2022 Łukasz "JustArchi" Domeradzki
// Contact: JustArchi@JustArchi.net
// |
// Licensed under the Apache License, Version 2.0 (the "License");
@@ -24,10 +24,11 @@ namespace ArchiSteamFarm.OfficialPlugins.SteamTokenDumper;
internal static class SharedInfo {
internal const byte ApiVersion = 2;
internal const byte AppInfosPerSingleRequest = byte.MaxValue;
internal const byte HoursBetweenUploads = 24;
internal const byte MaximumHoursBetweenRefresh = 8; // Per single bot account, makes sense to be 2 or 3 times less than MinimumHoursBetweenUploads
internal const byte MaximumMinutesBeforeFirstUpload = 60; // Must be greater or equal to MinimumMinutesBeforeFirstUpload
internal const byte MinimumHoursBetweenUploads = 24;
internal const byte MinimumMinutesBeforeFirstUpload = 10; // Must be less or equal to MaximumMinutesBeforeFirstUpload
internal const byte MinimumMinutesBetweenUploads = 5; // Rate limiting for the server
internal const string ServerURL = "https://asf-token-dumper.xpaw.me";
internal const string Token = "STEAM_TOKEN_DUMPER_TOKEN"; // This is filled automatically during our CI build with API key provided by xPaw for ASF project

View File

@@ -4,7 +4,7 @@
// / ___ \ | | | (__ | | | || | ___) || |_| __/| (_| || | | | | || _|| (_| || | | | | | | |
// /_/ \_\|_| \___||_| |_||_||____/ \__|\___| \__,_||_| |_| |_||_| \__,_||_| |_| |_| |_|
// |
// Copyright 2015-2021 Łukasz "JustArchi" Domeradzki
// Copyright 2015-2022 Łukasz "JustArchi" Domeradzki
// Contact: JustArchi@JustArchi.net
// |
// Licensed under the Apache License, Version 2.0 (the "License");
@@ -44,7 +44,7 @@ public sealed class SteamTokenDumperConfig {
public ImmutableHashSet<uint> SecretPackageIDs { get; private set; } = ImmutableHashSet<uint>.Empty;
[JsonProperty(Required = Required.DisallowNull)]
public bool SkipAutoGrantPackages { get; private set; }
public bool SkipAutoGrantPackages { get; private set; } = true;
[JsonConstructor]
internal SteamTokenDumperConfig() { }

View File

@@ -4,7 +4,7 @@
// / ___ \ | | | (__ | | | || | ___) || |_| __/| (_| || | | | | || _|| (_| || | | | | | | |
// /_/ \_\|_| \___||_| |_||_||____/ \__|\___| \__,_||_| |_| |_||_| \__,_||_| |_| |_| |_|
// |
// Copyright 2015-2021 Łukasz "JustArchi" Domeradzki
// Copyright 2015-2022 Łukasz "JustArchi" Domeradzki
// Contact: JustArchi@JustArchi.net
// |
// Licensed under the Apache License, Version 2.0 (the "License");

View File

@@ -4,7 +4,7 @@
// / ___ \ | | | (__ | | | || | ___) || |_| __/| (_| || | | | | || _|| (_| || | | | | | | |
// /_/ \_\|_| \___||_| |_||_||____/ \__|\___| \__,_||_| |_| |_||_| \__,_||_| |_| |_| |_|
// |
// Copyright 2015-2021 Łukasz "JustArchi" Domeradzki
// Copyright 2015-2022 Łukasz "JustArchi" Domeradzki
// Contact: JustArchi@JustArchi.net
// |
// Licensed under the Apache License, Version 2.0 (the "License");
@@ -23,6 +23,7 @@ using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.ComponentModel;
using System.Composition;
using System.Globalization;
using System.Linq;
@@ -43,7 +44,7 @@ using SteamKit2;
namespace ArchiSteamFarm.OfficialPlugins.SteamTokenDumper;
[Export(typeof(IPlugin))]
internal sealed class SteamTokenDumperPlugin : OfficialPlugin, IASF, IBot, IBotSteamClient, ISteamPICSChanges {
internal sealed class SteamTokenDumperPlugin : OfficialPlugin, IASF, IBot, IBotCommand2, IBotSteamClient, ISteamPICSChanges {
[JsonProperty]
internal static SteamTokenDumperConfig? Config { get; private set; }
@@ -53,6 +54,7 @@ internal sealed class SteamTokenDumperPlugin : OfficialPlugin, IASF, IBot, IBotS
private static readonly Timer SubmissionTimer = new(SubmitData);
private static GlobalCache? GlobalCache;
private static DateTimeOffset LastUploadAt = DateTimeOffset.MinValue;
[JsonProperty]
public override string Name => nameof(SteamTokenDumperPlugin);
@@ -62,7 +64,7 @@ internal sealed class SteamTokenDumperPlugin : OfficialPlugin, IASF, IBot, IBotS
public Task<uint> GetPreferredChangeNumberToStartFrom() => Task.FromResult(Config?.Enabled == true ? GlobalCache?.LastChangeNumber ?? 0 : 0);
public async void OnASFInit(IReadOnlyDictionary<string, JToken>? additionalConfigProperties = null) {
public async Task OnASFInit(IReadOnlyDictionary<string, JToken>? additionalConfigProperties = null) {
if (!SharedInfo.HasValidToken) {
ASF.ArchiLogger.LogGenericError(string.Format(CultureInfo.CurrentCulture, Strings.PluginDisabledMissingBuildToken, nameof(SteamTokenDumperPlugin)));
@@ -100,8 +102,6 @@ internal sealed class SteamTokenDumperPlugin : OfficialPlugin, IASF, IBot, IBotS
config.Enabled = true;
}
Config = config;
if (!config.Enabled) {
ASF.ArchiLogger.LogGenericInfo(string.Format(CultureInfo.CurrentCulture, Strings.PluginDisabledInConfig, nameof(SteamTokenDumperPlugin)));
@@ -132,23 +132,59 @@ internal sealed class SteamTokenDumperPlugin : OfficialPlugin, IASF, IBot, IBotS
}
}
Config = config;
#pragma warning disable CA5394 // This call isn't used in a security-sensitive manner
TimeSpan startIn = TimeSpan.FromMinutes(Random.Shared.Next(SharedInfo.MinimumMinutesBeforeFirstUpload, SharedInfo.MaximumMinutesBeforeFirstUpload));
#pragma warning restore CA5394 // This call isn't used in a security-sensitive manner
// ReSharper disable once SuspiciousLockOverSynchronizationPrimitive - this is not a mistake, we need extra synchronization, and we can re-use the semaphore object for that
lock (SubmissionSemaphore) {
SubmissionTimer.Change(startIn, TimeSpan.FromHours(SharedInfo.MinimumHoursBetweenUploads));
SubmissionTimer.Change(startIn, TimeSpan.FromHours(SharedInfo.HoursBetweenUploads));
}
ASF.ArchiLogger.LogGenericInfo(string.Format(CultureInfo.CurrentCulture, Strings.PluginInitializedAndEnabled, nameof(SteamTokenDumperPlugin), startIn.ToHumanReadable()));
}
public async void OnBotDestroy(Bot bot) {
if (bot == null) {
throw new ArgumentNullException(nameof(bot));
public Task<string?> OnBotCommand(Bot bot, EAccess access, string message, string[] args, ulong steamID = 0) {
ArgumentNullException.ThrowIfNull(bot);
if (!Enum.IsDefined(access)) {
throw new InvalidEnumArgumentException(nameof(access), (int) access, typeof(EAccess));
}
if ((args == null) || (args.Length == 0)) {
throw new ArgumentNullException(nameof(args));
}
switch (args[0].ToUpperInvariant()) {
case "STD" when access >= EAccess.Owner:
if (Config is not { Enabled: true }) {
return Task.FromResult((string?) string.Format(CultureInfo.CurrentCulture, ArchiSteamFarm.Localization.Strings.WarningFailedWithError, nameof(Config)));
}
TimeSpan minimumTimeBetweenUpload = TimeSpan.FromMinutes(SharedInfo.MinimumMinutesBetweenUploads);
if (LastUploadAt + minimumTimeBetweenUpload > DateTimeOffset.UtcNow) {
return Task.FromResult((string?) string.Format(CultureInfo.CurrentCulture, Strings.SubmissionFailedTooManyRequests, minimumTimeBetweenUpload.ToHumanReadable()));
}
// ReSharper disable once SuspiciousLockOverSynchronizationPrimitive - this is not a mistake, we need extra synchronization, and we can re-use the semaphore object for that
lock (SubmissionSemaphore) {
SubmissionTimer.Change(TimeSpan.Zero, TimeSpan.FromHours(SharedInfo.HoursBetweenUploads));
}
return Task.FromResult((string?) ArchiSteamFarm.Localization.Strings.Done);
case "STD" when access > EAccess.None:
return Task.FromResult((string?) ArchiSteamFarm.Localization.Strings.ErrorAccessDenied);
default:
return Task.FromResult((string?) null);
}
}
public async Task OnBotDestroy(Bot bot) {
ArgumentNullException.ThrowIfNull(bot);
if (BotSubscriptions.TryRemove(bot, out IDisposable? subscription)) {
subscription.Dispose();
}
@@ -160,10 +196,8 @@ internal sealed class SteamTokenDumperPlugin : OfficialPlugin, IASF, IBot, IBotS
}
}
public async void OnBotInit(Bot bot) {
if (bot == null) {
throw new ArgumentNullException(nameof(bot));
}
public async Task OnBotInit(Bot bot) {
ArgumentNullException.ThrowIfNull(bot);
if (Config is not { Enabled: true }) {
return;
@@ -179,21 +213,16 @@ internal sealed class SteamTokenDumperPlugin : OfficialPlugin, IASF, IBot, IBotS
}
}
public void OnBotSteamCallbacksInit(Bot bot, CallbackManager callbackManager) {
if (bot == null) {
throw new ArgumentNullException(nameof(bot));
}
if (callbackManager == null) {
throw new ArgumentNullException(nameof(callbackManager));
}
public Task OnBotSteamCallbacksInit(Bot bot, CallbackManager callbackManager) {
ArgumentNullException.ThrowIfNull(bot);
ArgumentNullException.ThrowIfNull(callbackManager);
if (BotSubscriptions.TryRemove(bot, out IDisposable? subscription)) {
subscription.Dispose();
}
if (Config is not { Enabled: true }) {
return;
return Task.CompletedTask;
}
subscription = callbackManager.Subscribe<SteamApps.LicenseListCallback>(callback => OnLicenseList(bot, callback));
@@ -201,27 +230,28 @@ internal sealed class SteamTokenDumperPlugin : OfficialPlugin, IASF, IBot, IBotS
if (!BotSubscriptions.TryAdd(bot, subscription)) {
subscription.Dispose();
}
return Task.CompletedTask;
}
public IReadOnlyCollection<ClientMsgHandler>? OnBotSteamHandlersInit(Bot bot) => null;
public Task<IReadOnlyCollection<ClientMsgHandler>?> OnBotSteamHandlersInit(Bot bot) => Task.FromResult((IReadOnlyCollection<ClientMsgHandler>?) null);
public override void OnLoaded() => Utilities.WarnAboutIncompleteTranslation(Strings.ResourceManager);
public override Task OnLoaded() {
Utilities.WarnAboutIncompleteTranslation(Strings.ResourceManager);
public void OnPICSChanges(uint currentChangeNumber, IReadOnlyDictionary<uint, SteamApps.PICSChangesCallback.PICSChangeData> appChanges, IReadOnlyDictionary<uint, SteamApps.PICSChangesCallback.PICSChangeData> packageChanges) {
return Task.CompletedTask;
}
public Task OnPICSChanges(uint currentChangeNumber, IReadOnlyDictionary<uint, SteamApps.PICSChangesCallback.PICSChangeData> appChanges, IReadOnlyDictionary<uint, SteamApps.PICSChangesCallback.PICSChangeData> packageChanges) {
if (currentChangeNumber == 0) {
throw new ArgumentOutOfRangeException(nameof(currentChangeNumber));
}
if (appChanges == null) {
throw new ArgumentNullException(nameof(appChanges));
}
if (packageChanges == null) {
throw new ArgumentNullException(nameof(packageChanges));
}
ArgumentNullException.ThrowIfNull(appChanges);
ArgumentNullException.ThrowIfNull(packageChanges);
if (Config is not { Enabled: true }) {
return;
return Task.CompletedTask;
}
if (GlobalCache == null) {
@@ -229,15 +259,17 @@ internal sealed class SteamTokenDumperPlugin : OfficialPlugin, IASF, IBot, IBotS
}
GlobalCache.OnPICSChanges(currentChangeNumber, appChanges);
return Task.CompletedTask;
}
public void OnPICSChangesRestart(uint currentChangeNumber) {
public Task OnPICSChangesRestart(uint currentChangeNumber) {
if (currentChangeNumber == 0) {
throw new ArgumentOutOfRangeException(nameof(currentChangeNumber));
}
if (Config is not { Enabled: true }) {
return;
return Task.CompletedTask;
}
if (GlobalCache == null) {
@@ -245,6 +277,8 @@ internal sealed class SteamTokenDumperPlugin : OfficialPlugin, IASF, IBot, IBotS
}
GlobalCache.OnPICSChangesRestart(currentChangeNumber);
return Task.CompletedTask;
}
private static async void OnBotRefreshTimer(object? state) {
@@ -256,13 +290,8 @@ internal sealed class SteamTokenDumperPlugin : OfficialPlugin, IASF, IBot, IBotS
}
private static async void OnLicenseList(Bot bot, SteamApps.LicenseListCallback callback) {
if (bot == null) {
throw new ArgumentNullException(nameof(bot));
}
if (callback == null) {
throw new ArgumentNullException(nameof(callback));
}
ArgumentNullException.ThrowIfNull(bot);
ArgumentNullException.ThrowIfNull(callback);
if (Config is not { Enabled: true }) {
return;
@@ -280,9 +309,7 @@ internal sealed class SteamTokenDumperPlugin : OfficialPlugin, IASF, IBot, IBotS
}
private static async Task Refresh(Bot bot, IReadOnlyCollection<uint>? packageIDs = null) {
if (bot == null) {
throw new ArgumentNullException(nameof(bot));
}
ArgumentNullException.ThrowIfNull(bot);
if (Config is not { Enabled: true }) {
return;
@@ -467,14 +494,14 @@ internal sealed class SteamTokenDumperPlugin : OfficialPlugin, IASF, IBot, IBotS
throw new InvalidOperationException(nameof(GlobalCache));
}
if (ASF.GlobalConfig == null) {
throw new InvalidOperationException(nameof(ASF.GlobalConfig));
}
if (ASF.WebBrowser == null) {
throw new InvalidOperationException(nameof(ASF.WebBrowser));
}
if (LastUploadAt + TimeSpan.FromMinutes(SharedInfo.MinimumMinutesBetweenUploads) > DateTimeOffset.UtcNow) {
return;
}
if (!await SubmissionSemaphore.WaitAsync(0).ConfigureAwait(false)) {
return;
}
@@ -490,7 +517,7 @@ internal sealed class SteamTokenDumperPlugin : OfficialPlugin, IASF, IBot, IBotS
return;
}
ulong contributorSteamID = (ASF.GlobalConfig.SteamOwnerID > 0) && new SteamID(ASF.GlobalConfig.SteamOwnerID).IsIndividualAccount ? ASF.GlobalConfig.SteamOwnerID : Bot.Bots.Values.Where(static bot => bot.SteamID > 0).OrderByDescending(static bot => bot.OwnedPackageIDs.Count).FirstOrDefault()?.SteamID ?? 0;
ulong contributorSteamID = ASF.GlobalConfig is { SteamOwnerID: > 0 } && new SteamID(ASF.GlobalConfig.SteamOwnerID).IsIndividualAccount ? ASF.GlobalConfig.SteamOwnerID : Bot.Bots.Values.Where(static bot => bot.SteamID > 0).MaxBy(static bot => bot.OwnedPackageIDs.Count)?.SteamID ?? 0;
if (contributorSteamID == 0) {
ASF.ArchiLogger.LogGenericError(string.Format(CultureInfo.CurrentCulture, Strings.SubmissionNoContributorSet, nameof(ASF.GlobalConfig.SteamOwnerID)));
@@ -503,7 +530,7 @@ internal sealed class SteamTokenDumperPlugin : OfficialPlugin, IASF, IBot, IBotS
ASF.ArchiLogger.LogGenericInfo(string.Format(CultureInfo.CurrentCulture, Strings.SubmissionInProgress, appTokens.Count, packageTokens.Count, depotKeys.Count));
ObjectResponse<ResponseData>? response = await ASF.WebBrowser.UrlPostToJsonObject<ResponseData, RequestData>(request, data: requestData, requestOptions: WebBrowser.ERequestOptions.ReturnClientErrors).ConfigureAwait(false);
ObjectResponse<ResponseData>? response = await ASF.WebBrowser.UrlPostToJsonObject<ResponseData, RequestData>(request, data: requestData, requestOptions: WebBrowser.ERequestOptions.ReturnClientErrors | WebBrowser.ERequestOptions.AllowInvalidBodyOnErrors).ConfigureAwait(false);
if (response == null) {
ASF.ArchiLogger.LogGenericWarning(ArchiSteamFarm.Localization.Strings.WarningFailed);
@@ -511,6 +538,9 @@ internal sealed class SteamTokenDumperPlugin : OfficialPlugin, IASF, IBot, IBotS
return;
}
// We've communicated with the server and didn't timeout, regardless of the success, this was the last upload attempt
LastUploadAt = DateTimeOffset.UtcNow;
if (response.StatusCode.IsClientErrorCode()) {
ASF.ArchiLogger.LogGenericWarning(string.Format(CultureInfo.CurrentCulture, ArchiSteamFarm.Localization.Strings.WarningFailedWithError, response.StatusCode));
@@ -525,7 +555,7 @@ internal sealed class SteamTokenDumperPlugin : OfficialPlugin, IASF, IBot, IBotS
// ReSharper disable once SuspiciousLockOverSynchronizationPrimitive - this is not a mistake, we need extra synchronization, and we can re-use the semaphore object for that
lock (SubmissionSemaphore) {
SubmissionTimer.Change(startIn, TimeSpan.FromHours(SharedInfo.MinimumHoursBetweenUploads));
SubmissionTimer.Change(startIn, TimeSpan.FromHours(SharedInfo.HoursBetweenUploads));
}
ASF.ArchiLogger.LogGenericInfo(string.Format(CultureInfo.CurrentCulture, Strings.SubmissionFailedTooManyRequests, startIn.ToHumanReadable()));
@@ -534,7 +564,7 @@ internal sealed class SteamTokenDumperPlugin : OfficialPlugin, IASF, IBot, IBotS
return;
}
if (!response.Content.Success) {
if (response.Content is not { Success: true }) {
ASF.ArchiLogger.LogGenericError(ArchiSteamFarm.Localization.Strings.WarningFailed);
return;

View File

@@ -5,6 +5,7 @@
<ItemGroup>
<PackageReference Include="ConfigureAwaitChecker.Analyzer" PrivateAssets="all" />
<PackageReference Include="JetBrains.Annotations" PrivateAssets="all" />
<PackageReference Include="Microsoft.NET.Test.Sdk" />
<PackageReference Include="MSTest.TestAdapter" />
<PackageReference Include="MSTest.TestFramework" />

View File

@@ -4,7 +4,7 @@
// / ___ \ | | | (__ | | | || | ___) || |_| __/| (_| || | | | | || _|| (_| || | | | | | | |
// /_/ \_\|_| \___||_| |_||_||____/ \__|\___| \__,_||_| |_| |_||_| \__,_||_| |_| |_| |_|
// |
// Copyright 2015-2021 Łukasz "JustArchi" Domeradzki
// Copyright 2015-2022 Łukasz "JustArchi" Domeradzki
// Contact: JustArchi@JustArchi.net
// |
// Licensed under the Apache License, Version 2.0 (the "License");

View File

@@ -4,7 +4,7 @@
// / ___ \ | | | (__ | | | || | ___) || |_| __/| (_| || | | | | || _|| (_| || | | | | | | |
// /_/ \_\|_| \___||_| |_||_||____/ \__|\___| \__,_||_| |_| |_||_| \__,_||_| |_| |_| |_|
// |
// Copyright 2015-2021 Łukasz "JustArchi" Domeradzki
// Copyright 2015-2022 Łukasz "JustArchi" Domeradzki
// Contact: JustArchi@JustArchi.net
// |
// Licensed under the Apache License, Version 2.0 (the "License");
@@ -485,13 +485,8 @@ public sealed class Bot {
}
private static void AssertResultMatchesExpectation(IReadOnlyDictionary<(uint RealAppID, ulong ContextID, ulong ClassID), uint> expectedResult, IReadOnlyCollection<Asset> itemsToSend) {
if (expectedResult == null) {
throw new ArgumentNullException(nameof(expectedResult));
}
if (itemsToSend == null) {
throw new ArgumentNullException(nameof(itemsToSend));
}
ArgumentNullException.ThrowIfNull(expectedResult);
ArgumentNullException.ThrowIfNull(itemsToSend);
Dictionary<(uint RealAppID, ulong ContextID, ulong ClassID), long> realResult = itemsToSend.GroupBy(static asset => (asset.RealAppID, asset.ContextID, asset.ClassID)).ToDictionary(static group => group.Key, static group => group.Sum(static asset => asset.Amount));
Assert.AreEqual(expectedResult.Count, realResult.Count);

View File

@@ -4,7 +4,7 @@
// / ___ \ | | | (__ | | | || | ___) || |_| __/| (_| || | | | | || _|| (_| || | | | | | | |
// /_/ \_\|_| \___||_| |_||_||____/ \__|\___| \__,_||_| |_| |_||_| \__,_||_| |_| |_| |_|
// |
// Copyright 2015-2021 Łukasz "JustArchi" Domeradzki
// Copyright 2015-2022 Łukasz "JustArchi" Domeradzki
// Contact: JustArchi@JustArchi.net
// |
// Licensed under the Apache License, Version 2.0 (the "License");

View File

@@ -4,7 +4,7 @@
// / ___ \ | | | (__ | | | || | ___) || |_| __/| (_| || | | | | || _|| (_| || | | | | | | |
// /_/ \_\|_| \___||_| |_||_||____/ \__|\___| \__,_||_| |_| |_||_| \__,_||_| |_| |_| |_|
// |
// Copyright 2015-2021 Łukasz "JustArchi" Domeradzki
// Copyright 2015-2022 Łukasz "JustArchi" Domeradzki
// Contact: JustArchi@JustArchi.net
// |
// Licensed under the Apache License, Version 2.0 (the "License");

View File

@@ -4,7 +4,7 @@
// / ___ \ | | | (__ | | | || | ___) || |_| __/| (_| || | | | | || _|| (_| || | | | | | | |
// /_/ \_\|_| \___||_| |_||_||____/ \__|\___| \__,_||_| |_| |_||_| \__,_||_| |_| |_| |_|
// |
// Copyright 2015-2021 Łukasz "JustArchi" Domeradzki
// Copyright 2015-2022 Łukasz "JustArchi" Domeradzki
// Contact: JustArchi@JustArchi.net
// |
// Licensed under the Apache License, Version 2.0 (the "License");
@@ -19,6 +19,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
using System;
using System.Collections.Generic;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using static ArchiSteamFarm.Core.Utilities;
@@ -34,9 +35,28 @@ public sealed class Utilities {
[TestMethod]
public void ContextSpecificWordsWeakenPassphrases() => Assert.IsTrue(TestPasswordStrength("archisteamfarmpassword").IsWeak);
[TestMethod]
public void EasyPasswordsHaveMeaningfulReason() {
(bool isWeak, string? reason) = TestPasswordStrength("CorrectHorse");
Assert.IsTrue(isWeak);
Assert.IsTrue(reason?.Contains("Capitalization doesn't help very much", StringComparison.OrdinalIgnoreCase));
}
[TestMethod]
public void LongPassphraseIsNotWeak() => Assert.IsFalse(TestPasswordStrength("10chars<!>asdf").IsWeak);
[TestMethod]
public void MemePasswordIsNotWeak() => Assert.IsFalse(TestPasswordStrength("correcthorsebatterystaple").IsWeak);
[TestMethod]
public void RepeatedPasswordsHaveMeaningfulReason() {
(bool isWeak, string? reason) = TestPasswordStrength("abcabcabc");
Assert.IsTrue(isWeak);
Assert.IsTrue(reason?.Contains("Avoid repeated words and characters", StringComparison.OrdinalIgnoreCase));
}
[TestMethod]
public void RepetitiveCharactersWeakenPassphrases() => Assert.IsTrue(TestPasswordStrength("testaaaatest").IsWeak);
@@ -48,5 +68,13 @@ public sealed class Utilities {
[TestMethod]
public void ShortPassphraseIsWeak() => Assert.IsTrue(TestPasswordStrength("four").IsWeak);
[TestMethod]
public void StraightRowsPasswordsHaveMeaningfulReason() {
(bool isWeak, string? reason) = TestPasswordStrength("`1234567890-=");
Assert.IsTrue(isWeak);
Assert.IsTrue(reason?.Contains("Straight rows of keys are easy to guess", StringComparison.OrdinalIgnoreCase));
}
}
#pragma warning restore CA1724 // We don't care about the potential conflict, as ASF class name has a priority

File diff suppressed because one or more lines are too long

View File

@@ -33,7 +33,6 @@
<PackageReference Include="Microsoft.AspNetCore.Cors" />
<PackageReference Include="Microsoft.AspNetCore.Diagnostics" />
<PackageReference Include="Microsoft.AspNetCore.HttpOverrides" />
<PackageReference Include="Microsoft.AspNetCore.Localization" />
<PackageReference Include="Microsoft.AspNetCore.ResponseCaching" />
<PackageReference Include="Microsoft.AspNetCore.ResponseCompression" />
<PackageReference Include="Microsoft.AspNetCore.Server.Kestrel" />
@@ -64,7 +63,7 @@
</ItemGroup>
<ItemGroup>
<Content Include="..\LICENSE-2.0.txt">
<Content Include="..\LICENSE.txt">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<ExcludeFromSingleFile>true</ExcludeFromSingleFile>
<Link>%(RecursiveDir)%(Filename)%(Extension)</Link>

View File

@@ -4,7 +4,7 @@
// / ___ \ | | | (__ | | | || | ___) || |_| __/| (_| || | | | | || _|| (_| || | | | | | | |
// /_/ \_\|_| \___||_| |_||_||____/ \__|\___| \__,_||_| |_| |_||_| \__,_||_| |_| |_| |_|
// |
// Copyright 2015-2021 Łukasz "JustArchi" Domeradzki
// Copyright 2015-2022 Łukasz "JustArchi" Domeradzki
// Contact: JustArchi@JustArchi.net
// |
// Licensed under the Apache License, Version 2.0 (the "License");
@@ -24,10 +24,10 @@ using System.Runtime.CompilerServices;
[assembly: CLSCompliant(false)]
#if DEBUG
[assembly: InternalsVisibleTo("ArchiSteamFarm.Tests")]
[assembly: InternalsVisibleTo("ArchiSteamFarm.OfficialPlugins.SteamTokenDumper")]
#else
#if ASF_SIGNED_BUILD
[assembly: InternalsVisibleTo("ArchiSteamFarm.Tests, PublicKey=002400000480000014020000060200000024000052534131001000000100010099f0e5961ec7497fd7de1cba2b8c5eff3b18c1faf3d7a8d56e063359c7f928b54b14eae24d23d9d3c1a5db7ceca82edb6956d43e8ea2a0b7223e6e6836c0b809de43fde69bf33fba73cf669e71449284d477333d4b6e54fb69f7b6c4b4811b8fe26e88975e593cffc0e321490a50500865c01e50ab87c8a943b2a788af47dc20f2b860062b7b6df25477e471a744485a286b435cea2df3953cbb66febd8db73f3ccb4588886373141d200f749ba40bb11926b668cc15f328412dd0b0b835909229985336eb4a34f47925558dc6dc3910ea09c1aad5c744833f26ad9de727559d393526a7a29b3383de87802a034ead8ecc2d37340a5fa9b406774446256337d77e3c9e8486b5e732097e238312deaf5b4efcc04df8ecb986d90ee12b4a8a9a00319cc25cb91fd3e36a3cc39e501f83d14eb1e1a6fa6a1365483d99f4cefad1ea5dec204dad958e2a9a93add19781a8aa7bac71747b11d156711eafd1e873e19836eb573fa5cde284739df09b658ed40c56c7b5a7596840774a7065864e6c2af7b5a8bf7a2d238de83d77891d98ef5a4a58248c655a1c7c97c99e01d9928dc60c629eeb523356dc3686e3f9a1a30ffcd0268cd03718292f21d839fce741f4c1163001ab5b654c37d862998962a05e8028e061c611384772777ef6a49b00ebb4f228308e61b2afe408b33db2d82c4f385e26d7438ec0a183c64eeca4138cbc3dc2")]
[assembly: InternalsVisibleTo("ArchiSteamFarm.OfficialPlugins.SteamTokenDumper, PublicKey=002400000480000014020000060200000024000052534131001000000100010099f0e5961ec7497fd7de1cba2b8c5eff3b18c1faf3d7a8d56e063359c7f928b54b14eae24d23d9d3c1a5db7ceca82edb6956d43e8ea2a0b7223e6e6836c0b809de43fde69bf33fba73cf669e71449284d477333d4b6e54fb69f7b6c4b4811b8fe26e88975e593cffc0e321490a50500865c01e50ab87c8a943b2a788af47dc20f2b860062b7b6df25477e471a744485a286b435cea2df3953cbb66febd8db73f3ccb4588886373141d200f749ba40bb11926b668cc15f328412dd0b0b835909229985336eb4a34f47925558dc6dc3910ea09c1aad5c744833f26ad9de727559d393526a7a29b3383de87802a034ead8ecc2d37340a5fa9b406774446256337d77e3c9e8486b5e732097e238312deaf5b4efcc04df8ecb986d90ee12b4a8a9a00319cc25cb91fd3e36a3cc39e501f83d14eb1e1a6fa6a1365483d99f4cefad1ea5dec204dad958e2a9a93add19781a8aa7bac71747b11d156711eafd1e873e19836eb573fa5cde284739df09b658ed40c56c7b5a7596840774a7065864e6c2af7b5a8bf7a2d238de83d77891d98ef5a4a58248c655a1c7c97c99e01d9928dc60c629eeb523356dc3686e3f9a1a30ffcd0268cd03718292f21d839fce741f4c1163001ab5b654c37d862998962a05e8028e061c611384772777ef6a49b00ebb4f228308e61b2afe408b33db2d82c4f385e26d7438ec0a183c64eeca4138cbc3dc2")]
#else
[assembly: InternalsVisibleTo("ArchiSteamFarm.Tests")]
[assembly: InternalsVisibleTo("ArchiSteamFarm.OfficialPlugins.SteamTokenDumper")]
#endif

View File

@@ -4,7 +4,7 @@
// / ___ \ | | | (__ | | | || | ___) || |_| __/| (_| || | | | | || _|| (_| || | | | | | | |
// /_/ \_\|_| \___||_| |_||_||____/ \__|\___| \__,_||_| |_| |_||_| \__,_||_| |_| |_| |_|
// |
// Copyright 2015-2021 Łukasz "JustArchi" Domeradzki
// Copyright 2015-2022 Łukasz "JustArchi" Domeradzki
// Contact: JustArchi@JustArchi.net
// |
// Licensed under the Apache License, Version 2.0 (the "License");
@@ -34,9 +34,7 @@ internal sealed class ConcurrentEnumerator<T> : IEnumerator<T> {
object? IEnumerator.Current => Current;
internal ConcurrentEnumerator(IReadOnlyCollection<T> collection, IDisposable lockObject) {
if (collection == null) {
throw new ArgumentNullException(nameof(collection));
}
ArgumentNullException.ThrowIfNull(collection);
LockObject = lockObject ?? throw new ArgumentNullException(nameof(lockObject));
Enumerator = collection.GetEnumerator();

View File

@@ -4,7 +4,7 @@
// / ___ \ | | | (__ | | | || | ___) || |_| __/| (_| || | | | | || _|| (_| || | | | | | | |
// /_/ \_\|_| \___||_| |_||_||____/ \__|\___| \__,_||_| |_| |_||_| \__,_||_| |_| |_| |_|
// |
// Copyright 2015-2021 Łukasz "JustArchi" Domeradzki
// Copyright 2015-2022 Łukasz "JustArchi" Domeradzki
// Contact: JustArchi@JustArchi.net
// |
// Licensed under the Apache License, Version 2.0 (the "License");
@@ -39,9 +39,7 @@ public sealed class ConcurrentHashSet<T> : IReadOnlyCollection<T>, ISet<T> where
public ConcurrentHashSet() => BackingCollection = new ConcurrentDictionary<T, bool>();
public ConcurrentHashSet(IEqualityComparer<T> comparer) {
if (comparer == null) {
throw new ArgumentNullException(nameof(comparer));
}
ArgumentNullException.ThrowIfNull(comparer);
BackingCollection = new ConcurrentDictionary<T, bool>(comparer);
}
@@ -71,9 +69,7 @@ public sealed class ConcurrentHashSet<T> : IReadOnlyCollection<T>, ISet<T> where
public void CopyTo(T[] array, int arrayIndex) => BackingCollection.Keys.CopyTo(array, arrayIndex);
public void ExceptWith(IEnumerable<T> other) {
if (other == null) {
throw new ArgumentNullException(nameof(other));
}
ArgumentNullException.ThrowIfNull(other);
foreach (T item in other) {
Remove(item);
@@ -151,9 +147,7 @@ public sealed class ConcurrentHashSet<T> : IReadOnlyCollection<T>, ISet<T> where
}
public void UnionWith(IEnumerable<T> other) {
if (other == null) {
throw new ArgumentNullException(nameof(other));
}
ArgumentNullException.ThrowIfNull(other);
foreach (T otherElement in other) {
Add(otherElement);

View File

@@ -4,7 +4,7 @@
// / ___ \ | | | (__ | | | || | ___) || |_| __/| (_| || | | | | || _|| (_| || | | | | | | |
// /_/ \_\|_| \___||_| |_||_||____/ \__|\___| \__,_||_| |_| |_||_| \__,_||_| |_| |_| |_|
// |
// Copyright 2015-2021 Łukasz "JustArchi" Domeradzki
// Copyright 2015-2022 Łukasz "JustArchi" Domeradzki
// Contact: JustArchi@JustArchi.net
// |
// Licensed under the Apache License, Version 2.0 (the "License");

View File

@@ -4,7 +4,7 @@
// / ___ \ | | | (__ | | | || | ___) || |_| __/| (_| || | | | | || _|| (_| || | | | | | | |
// /_/ \_\|_| \___||_| |_||_||____/ \__|\___| \__,_||_| |_| |_||_| \__,_||_| |_| |_| |_|
// |
// Copyright 2015-2021 Łukasz "JustArchi" Domeradzki
// Copyright 2015-2022 Łukasz "JustArchi" Domeradzki
// Contact: JustArchi@JustArchi.net
// |
// Licensed under the Apache License, Version 2.0 (the "License");
@@ -35,7 +35,7 @@ internal sealed class FixedSizeConcurrentQueue<T> : IEnumerable<T> {
set {
if (value == 0) {
ASF.ArchiLogger.LogNullError(nameof(value));
ASF.ArchiLogger.LogNullError(value);
return;
}

View File

@@ -0,0 +1,126 @@
// _ _ _ ____ _ _____
// / \ _ __ ___ | |__ (_)/ ___| | |_ ___ __ _ _ __ ___ | ___|__ _ _ __ _ __ ___
// / _ \ | '__|/ __|| '_ \ | |\___ \ | __|/ _ \ / _` || '_ ` _ \ | |_ / _` || '__|| '_ ` _ \
// / ___ \ | | | (__ | | | || | ___) || |_| __/| (_| || | | | | || _|| (_| || | | | | | | |
// /_/ \_\|_| \___||_| |_||_||____/ \__|\___| \__,_||_| |_| |_||_| \__,_||_| |_| |_| |_|
// |
// Copyright 2015-2022 Łukasz "JustArchi" Domeradzki
// Contact: JustArchi@JustArchi.net
// |
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// |
// http://www.apache.org/licenses/LICENSE-2.0
// |
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
using System;
using System.Collections;
using System.Collections.Concurrent;
using System.Collections.Generic;
using JetBrains.Annotations;
using Newtonsoft.Json;
namespace ArchiSteamFarm.Collections;
public sealed class ObservableConcurrentDictionary<TKey, TValue> : IDictionary<TKey, TValue>, IReadOnlyDictionary<TKey, TValue> where TKey : notnull {
public event EventHandler? OnModified;
[PublicAPI]
public int Count => BackingDictionary.Count;
[PublicAPI]
public bool IsEmpty => BackingDictionary.IsEmpty;
public bool IsReadOnly => false;
[JsonProperty(Required = Required.DisallowNull)]
private readonly ConcurrentDictionary<TKey, TValue> BackingDictionary = new();
int ICollection<KeyValuePair<TKey, TValue>>.Count => BackingDictionary.Count;
int IReadOnlyCollection<KeyValuePair<TKey, TValue>>.Count => BackingDictionary.Count;
IEnumerable<TKey> IReadOnlyDictionary<TKey, TValue>.Keys => BackingDictionary.Keys;
ICollection<TKey> IDictionary<TKey, TValue>.Keys => BackingDictionary.Keys;
IEnumerable<TValue> IReadOnlyDictionary<TKey, TValue>.Values => BackingDictionary.Values;
ICollection<TValue> IDictionary<TKey, TValue>.Values => BackingDictionary.Values;
public TValue this[TKey key] {
get => BackingDictionary[key];
set {
if (BackingDictionary.TryGetValue(key, out TValue? savedValue) && EqualityComparer<TValue>.Default.Equals(savedValue, value)) {
return;
}
BackingDictionary[key] = value;
OnModified?.Invoke(this, EventArgs.Empty);
}
}
public void Add(KeyValuePair<TKey, TValue> item) {
(TKey key, TValue value) = item;
Add(key, value);
}
public void Add(TKey key, TValue value) => TryAdd(key, value);
public void Clear() {
if (BackingDictionary.IsEmpty) {
return;
}
BackingDictionary.Clear();
OnModified?.Invoke(this, EventArgs.Empty);
}
public bool Contains(KeyValuePair<TKey, TValue> item) => ((ICollection<KeyValuePair<TKey, TValue>>) BackingDictionary).Contains(item);
public void CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) => ((ICollection<KeyValuePair<TKey, TValue>>) BackingDictionary).CopyTo(array, arrayIndex);
public IEnumerator<KeyValuePair<TKey, TValue>> GetEnumerator() => BackingDictionary.GetEnumerator();
public bool Remove(KeyValuePair<TKey, TValue> item) {
ICollection<KeyValuePair<TKey, TValue>> collection = BackingDictionary;
if (!collection.Remove(item)) {
return false;
}
OnModified?.Invoke(this, EventArgs.Empty);
return true;
}
public bool Remove(TKey key) {
if (!BackingDictionary.TryRemove(key, out _)) {
return false;
}
OnModified?.Invoke(this, EventArgs.Empty);
return true;
}
bool IDictionary<TKey, TValue>.ContainsKey(TKey key) => BackingDictionary.ContainsKey(key);
bool IReadOnlyDictionary<TKey, TValue>.ContainsKey(TKey key) => BackingDictionary.ContainsKey(key);
IEnumerator IEnumerable.GetEnumerator() => GetEnumerator();
bool IReadOnlyDictionary<TKey, TValue>.TryGetValue(TKey key, out TValue value) => BackingDictionary.TryGetValue(key, out value!);
bool IDictionary<TKey, TValue>.TryGetValue(TKey key, out TValue value) => BackingDictionary.TryGetValue(key, out value!);
[PublicAPI]
public bool TryAdd(TKey key, TValue value) {
if (!BackingDictionary.TryAdd(key, value)) {
return false;
}
OnModified?.Invoke(this, EventArgs.Empty);
return true;
}
[PublicAPI]
public bool TryGetValue(TKey key, out TValue? value) => BackingDictionary.TryGetValue(key, out value);
}

View File

@@ -4,7 +4,7 @@
// / ___ \ | | | (__ | | | || | ___) || |_| __/| (_| || | | | | || _|| (_| || | | | | | | |
// /_/ \_\|_| \___||_| |_||_||____/ \__|\___| \__,_||_| |_| |_||_| \__,_||_| |_| |_| |_|
// |
// Copyright 2015-2021 Łukasz "JustArchi" Domeradzki
// Copyright 2015-2022 Łukasz "JustArchi" Domeradzki
// Contact: JustArchi@JustArchi.net
// |
// Licensed under the Apache License, Version 2.0 (the "License");
@@ -69,6 +69,8 @@ public static class ASF {
[PublicAPI]
public static WebBrowser? WebBrowser { get; private set; }
internal static readonly SemaphoreSlim OpenConnectionsSemaphore = new(WebBrowser.MaxConnections, WebBrowser.MaxConnections);
internal static ICrossProcessSemaphore? ConfirmationsSemaphore { get; private set; }
internal static ICrossProcessSemaphore? GiftsSemaphore { get; private set; }
internal static ICrossProcessSemaphore? InventorySemaphore { get; private set; }
@@ -94,7 +96,7 @@ public static class ASF {
}
internal static string GetFilePath(EFileType fileType) {
if (!Enum.IsDefined(typeof(EFileType), fileType)) {
if (!Enum.IsDefined(fileType)) {
throw new InvalidEnumArgumentException(nameof(fileType), (int) fileType, typeof(EFileType));
}
@@ -261,7 +263,7 @@ public static class ASF {
}
if (binaryAsset.DownloadURL == null) {
ArchiLogger.LogNullError(nameof(binaryAsset.DownloadURL));
ArchiLogger.LogNullError(binaryAsset.DownloadURL);
return null;
}
@@ -299,7 +301,7 @@ public static class ASF {
progressReporter.ProgressChanged -= OnProgressChanged;
}
if (response == null) {
if (response?.Content == null) {
return null;
}
@@ -315,12 +317,18 @@ public static class ASF {
return SharedInfo.Version;
}
try {
await PluginsCore.OnUpdateProceeding(newVersion).ConfigureAwait(false);
bool kestrelWasRunning = ArchiKestrel.IsRunning;
if (kestrelWasRunning) {
// We disable ArchiKestrel here as the update process moves the core files and might result in IPC crash
// TODO: It might fail if the update was triggered from the API, this should be something to improve in the future, by changing the structure into request -> return response -> finish update
await ArchiKestrel.Stop().ConfigureAwait(false);
} catch (Exception e) {
ArchiLogger.LogGenericWarningException(e);
try {
await ArchiKestrel.Stop().ConfigureAwait(false);
} catch (Exception e) {
ArchiLogger.LogGenericWarningException(e);
}
}
ArchiLogger.LogGenericInfo(Strings.PatchingFiles);
@@ -338,11 +346,23 @@ public static class ASF {
} catch (Exception e) {
ArchiLogger.LogGenericException(e);
if (kestrelWasRunning) {
// We've temporarily disabled ArchiKestrel but the update has failed, let's bring it back up
// We can't even be sure if it's possible to bring it back up in this state, but it's worth trying anyway
try {
await ArchiKestrel.Start().ConfigureAwait(false);
} catch (Exception ex) {
ArchiLogger.LogGenericWarningException(ex);
}
}
return null;
}
ArchiLogger.LogGenericInfo(Strings.UpdateFinished);
await PluginsCore.OnUpdateFinished(newVersion).ConfigureAwait(false);
return newVersion;
} finally {
UpdateSemaphore.Release();
@@ -455,9 +475,7 @@ public static class ASF {
[UnconditionalSuppressMessage("AssemblyLoadTrimming", "IL2026:RequiresUnreferencedCode", Justification = "We don't care about trimmed assemblies, as we need it to work only with the known (used) ones")]
private static void LoadAssembliesRecursively(Assembly assembly, ISet<string> loadedAssembliesNames) {
if (assembly == null) {
throw new ArgumentNullException(nameof(assembly));
}
ArgumentNullException.ThrowIfNull(assembly);
if ((loadedAssembliesNames == null) || (loadedAssembliesNames.Count == 0)) {
throw new ArgumentNullException(nameof(loadedAssembliesNames));
@@ -481,13 +499,8 @@ public static class ASF {
private static async void OnAutoUpdatesTimer(object? state = null) => await UpdateAndRestart().ConfigureAwait(false);
private static async void OnChanged(object sender, FileSystemEventArgs e) {
if (sender == null) {
throw new ArgumentNullException(nameof(sender));
}
if (e == null) {
throw new ArgumentNullException(nameof(e));
}
ArgumentNullException.ThrowIfNull(sender);
ArgumentNullException.ThrowIfNull(e);
if (string.IsNullOrEmpty(e.Name)) {
throw new InvalidOperationException(nameof(e.Name));
@@ -567,13 +580,8 @@ public static class ASF {
}
private static async void OnCreated(object sender, FileSystemEventArgs e) {
if (sender == null) {
throw new ArgumentNullException(nameof(sender));
}
if (e == null) {
throw new ArgumentNullException(nameof(e));
}
ArgumentNullException.ThrowIfNull(sender);
ArgumentNullException.ThrowIfNull(e);
if (string.IsNullOrEmpty(e.Name)) {
throw new InvalidOperationException(nameof(e.Name));
@@ -709,13 +717,8 @@ public static class ASF {
}
private static async void OnDeleted(object sender, FileSystemEventArgs e) {
if (sender == null) {
throw new ArgumentNullException(nameof(sender));
}
if (e == null) {
throw new ArgumentNullException(nameof(e));
}
ArgumentNullException.ThrowIfNull(sender);
ArgumentNullException.ThrowIfNull(e);
if (string.IsNullOrEmpty(e.Name)) {
throw new InvalidOperationException(nameof(e.Name));
@@ -833,13 +836,8 @@ public static class ASF {
}
private static async void OnRenamed(object sender, RenamedEventArgs e) {
if (sender == null) {
throw new ArgumentNullException(nameof(sender));
}
if (e == null) {
throw new ArgumentNullException(nameof(e));
}
ArgumentNullException.ThrowIfNull(sender);
ArgumentNullException.ThrowIfNull(e);
if (string.IsNullOrEmpty(e.OldName)) {
throw new InvalidOperationException(nameof(e.OldName));
@@ -863,7 +861,7 @@ public static class ASF {
private static async Task RegisterBots() {
if ((GlobalConfig == null) || (GlobalDatabase == null) || (WebBrowser == null)) {
throw new ArgumentNullException($"{nameof(GlobalConfig)} || {nameof(GlobalDatabase)} || {nameof(WebBrowser)}");
throw new InvalidOperationException($"{nameof(GlobalConfig)} || {nameof(GlobalDatabase)} || {nameof(WebBrowser)}");
}
// Ensure that we ask for a list of servers if we don't have any saved servers available
@@ -910,7 +908,7 @@ public static class ASF {
private static async Task UpdateAndRestart() {
if (GlobalConfig == null) {
throw new ArgumentNullException(nameof(GlobalConfig));
throw new InvalidOperationException(nameof(GlobalConfig));
}
if (!SharedInfo.BuildInfo.CanUpdate || (GlobalConfig.UpdateChannel == GlobalConfig.EUpdateChannel.None)) {
@@ -949,9 +947,7 @@ public static class ASF {
}
private static bool UpdateFromArchive(ZipArchive archive, string targetDirectory) {
if (archive == null) {
throw new ArgumentNullException(nameof(archive));
}
ArgumentNullException.ThrowIfNull(archive);
if (string.IsNullOrEmpty(targetDirectory)) {
throw new ArgumentNullException(nameof(targetDirectory));
@@ -975,7 +971,7 @@ public static class ASF {
string fileName = Path.GetFileName(file);
if (string.IsNullOrEmpty(fileName)) {
ArchiLogger.LogNullError(nameof(fileName));
ArchiLogger.LogNullError(fileName);
return false;
}
@@ -983,7 +979,7 @@ public static class ASF {
string relativeFilePath = Path.GetRelativePath(targetDirectory, file);
if (string.IsNullOrEmpty(relativeFilePath)) {
ArchiLogger.LogNullError(nameof(relativeFilePath));
ArchiLogger.LogNullError(relativeFilePath);
return false;
}
@@ -992,7 +988,7 @@ public static class ASF {
switch (relativeDirectoryName) {
case null:
ArchiLogger.LogNullError(nameof(relativeDirectoryName));
ArchiLogger.LogNullError(relativeDirectoryName);
return false;
case "":
@@ -1056,7 +1052,7 @@ public static class ASF {
string? directory = Path.GetDirectoryName(file);
if (string.IsNullOrEmpty(directory)) {
ArchiLogger.LogNullError(nameof(directory));
ArchiLogger.LogNullError(directory);
return false;
}

View File

@@ -4,7 +4,7 @@
// / ___ \ | | | (__ | | | || | ___) || |_| __/| (_| || | | | | || _|| (_| || | | | | | | |
// /_/ \_\|_| \___||_| |_||_||____/ \__|\___| \__,_||_| |_| |_||_| \__,_||_| |_| |_| |_|
// |
// Copyright 2015-2021 Łukasz "JustArchi" Domeradzki
// Copyright 2015-2022 Łukasz "JustArchi" Domeradzki
// Contact: JustArchi@JustArchi.net
// |
// Licensed under the Apache License, Version 2.0 (the "License");

View File

@@ -4,7 +4,7 @@
// / ___ \ | | | (__ | | | || | ___) || |_| __/| (_| || | | | | || _|| (_| || | | | | | | |
// /_/ \_\|_| \___||_| |_||_||____/ \__|\___| \__,_||_| |_| |_||_| \__,_||_| |_| |_| |_|
// |
// Copyright 2015-2021 Łukasz "JustArchi" Domeradzki
// Copyright 2015-2022 Łukasz "JustArchi" Domeradzki
// Contact: JustArchi@JustArchi.net
// |
// Licensed under the Apache License, Version 2.0 (the "License");
@@ -31,6 +31,7 @@ using ArchiSteamFarm.Localization;
using ArchiSteamFarm.Steam;
using ArchiSteamFarm.Steam.Data;
using ArchiSteamFarm.Steam.Storage;
using ArchiSteamFarm.Storage;
using ArchiSteamFarm.Web;
using ArchiSteamFarm.Web.Responses;
using Newtonsoft.Json;
@@ -41,9 +42,7 @@ internal static class ArchiNet {
private static Uri URL => new("https://asf.JustArchi.net");
internal static async Task<HttpStatusCode?> AnnounceForListing(Bot bot, IReadOnlyCollection<Asset> inventory, IReadOnlyCollection<Asset.EType> acceptedMatchableTypes, string tradeToken, string? nickname = null, string? avatarHash = null) {
if (bot == null) {
throw new ArgumentNullException(nameof(bot));
}
ArgumentNullException.ThrowIfNull(bot);
if ((inventory == null) || (inventory.Count == 0)) {
throw new ArgumentNullException(nameof(inventory));
@@ -63,13 +62,14 @@ internal static class ArchiNet {
Uri request = new(URL, "/Api/Announce");
Dictionary<string, string> data = new(9, StringComparer.Ordinal) {
Dictionary<string, string> data = new(10, StringComparer.Ordinal) {
{ "AvatarHash", avatarHash ?? "" },
{ "GamesCount", inventory.Select(static item => item.RealAppID).Distinct().Count().ToString(CultureInfo.InvariantCulture) },
{ "Guid", (ASF.GlobalDatabase?.Identifier ?? Guid.NewGuid()).ToString("N") },
{ "ItemsCount", inventory.Count.ToString(CultureInfo.InvariantCulture) },
{ "MatchableTypes", JsonConvert.SerializeObject(acceptedMatchableTypes) },
{ "MatchEverything", bot.BotConfig.TradingPreferences.HasFlag(BotConfig.ETradingPreferences.MatchEverything) ? "1" : "0" },
{ "MaxTradeHoldDuration", (ASF.GlobalConfig?.MaxTradeHoldDuration ?? GlobalConfig.DefaultMaxTradeHoldDuration).ToString(CultureInfo.InvariantCulture) },
{ "Nickname", nickname ?? "" },
{ "SteamID", bot.SteamID.ToString(CultureInfo.InvariantCulture) },
{ "TradeToken", tradeToken }
@@ -81,9 +81,7 @@ internal static class ArchiNet {
}
internal static async Task<string?> FetchBuildChecksum(Version version, string variant) {
if (version == null) {
throw new ArgumentNullException(nameof(version));
}
ArgumentNullException.ThrowIfNull(version);
if (string.IsNullOrEmpty(variant)) {
throw new ArgumentNullException(nameof(variant));
@@ -97,7 +95,7 @@ internal static class ArchiNet {
ObjectResponse<ChecksumResponse>? response = await ASF.WebBrowser.UrlGetToJsonObject<ChecksumResponse>(request).ConfigureAwait(false);
if (response == null) {
if (response?.Content == null) {
return null;
}
@@ -105,9 +103,7 @@ internal static class ArchiNet {
}
internal static async Task<ImmutableHashSet<ListedUser>?> GetListedUsers(Bot bot) {
if (bot == null) {
throw new ArgumentNullException(nameof(bot));
}
ArgumentNullException.ThrowIfNull(bot);
Uri request = new(URL, "/Api/Bots");
@@ -117,9 +113,7 @@ internal static class ArchiNet {
}
internal static async Task<HttpStatusCode?> HeartBeatForListing(Bot bot) {
if (bot == null) {
throw new ArgumentNullException(nameof(bot));
}
ArgumentNullException.ThrowIfNull(bot);
Uri request = new(URL, "/Api/HeartBeat");
@@ -135,31 +129,30 @@ internal static class ArchiNet {
[SuppressMessage("ReSharper", "ClassCannotBeInstantiated")]
internal sealed class ListedUser {
#pragma warning disable CS0649 // False positive, it's a field set during json deserialization
[JsonProperty(PropertyName = "items_count", Required = Required.Always)]
[JsonProperty("items_count", Required = Required.Always)]
internal readonly ushort ItemsCount;
#pragma warning restore CS0649 // False positive, it's a field set during json deserialization
internal readonly HashSet<Asset.EType> MatchableTypes = new();
#pragma warning disable CS0649 // False positive, it's a field set during json deserialization
[JsonProperty(PropertyName = "steam_id", Required = Required.Always)]
internal readonly ulong SteamID;
#pragma warning restore CS0649 // False positive, it's a field set during json deserialization
[JsonProperty("max_trade_hold_duration", Required = Required.Always)]
internal readonly byte MaxTradeHoldDuration;
[JsonProperty(PropertyName = "trade_token", Required = Required.Always)]
[JsonProperty("steam_id", Required = Required.Always)]
internal readonly ulong SteamID;
[JsonProperty("trade_token", Required = Required.Always)]
internal readonly string TradeToken = "";
internal float Score => GamesCount / (float) ItemsCount;
#pragma warning disable CS0649 // False positive, it's a field set during json deserialization
[JsonProperty(PropertyName = "games_count", Required = Required.Always)]
[JsonProperty("games_count", Required = Required.Always)]
private readonly ushort GamesCount;
#pragma warning restore CS0649 // False positive, it's a field set during json deserialization
internal bool MatchEverything { get; private set; }
[JsonProperty(PropertyName = "matchable_backgrounds", Required = Required.Always)]
[JsonProperty("matchable_backgrounds", Required = Required.Always)]
private byte MatchableBackgroundsNumber {
set {
switch (value) {
@@ -179,7 +172,7 @@ internal static class ArchiNet {
}
}
[JsonProperty(PropertyName = "matchable_cards", Required = Required.Always)]
[JsonProperty("matchable_cards", Required = Required.Always)]
private byte MatchableCardsNumber {
set {
switch (value) {
@@ -199,7 +192,7 @@ internal static class ArchiNet {
}
}
[JsonProperty(PropertyName = "matchable_emoticons", Required = Required.Always)]
[JsonProperty("matchable_emoticons", Required = Required.Always)]
private byte MatchableEmoticonsNumber {
set {
switch (value) {
@@ -219,7 +212,7 @@ internal static class ArchiNet {
}
}
[JsonProperty(PropertyName = "matchable_foil_cards", Required = Required.Always)]
[JsonProperty("matchable_foil_cards", Required = Required.Always)]
private byte MatchableFoilCardsNumber {
set {
switch (value) {
@@ -239,7 +232,7 @@ internal static class ArchiNet {
}
}
[JsonProperty(PropertyName = "match_everything", Required = Required.Always)]
[JsonProperty("match_everything", Required = Required.Always)]
private byte MatchEverythingNumber {
set {
switch (value) {

View File

@@ -4,7 +4,7 @@
// / ___ \ | | | (__ | | | || | ___) || |_| __/| (_| || | | | | || _|| (_| || | | | | | | |
// /_/ \_\|_| \___||_| |_||_||____/ \__|\___| \__,_||_| |_| |_||_| \__,_||_| |_| |_| |_|
// |
// Copyright 2015-2021 Łukasz "JustArchi" Domeradzki
// Copyright 2015-2022 Łukasz "JustArchi" Domeradzki
// Contact: JustArchi@JustArchi.net
// |
// Licensed under the Apache License, Version 2.0 (the "License");
@@ -20,6 +20,7 @@
// limitations under the License.
using System;
using ArchiSteamFarm.Storage;
using SteamKit2;
namespace ArchiSteamFarm.Core;
@@ -31,7 +32,7 @@ internal static class Debugging {
internal static bool IsDebugBuild => false;
#endif
internal static bool IsDebugConfigured => ASF.GlobalConfig?.Debug ?? throw new InvalidOperationException(nameof(ASF.GlobalConfig));
internal static bool IsDebugConfigured => ASF.GlobalConfig?.Debug ?? GlobalConfig.DefaultDebug;
internal static bool IsUserDebugging => IsDebugBuild || IsDebugConfigured;

View File

@@ -4,7 +4,7 @@
// / ___ \ | | | (__ | | | || | ___) || |_| __/| (_| || | | | | || _|| (_| || | | | | | | |
// /_/ \_\|_| \___||_| |_||_||____/ \__|\___| \__,_||_| |_| |_||_| \__,_||_| |_| |_| |_|
// |
// Copyright 2015-2021 Łukasz "JustArchi" Domeradzki
// Copyright 2015-2022 Łukasz "JustArchi" Domeradzki
// Contact: JustArchi@JustArchi.net
// |
// Licensed under the Apache License, Version 2.0 (the "License");

View File

@@ -4,7 +4,7 @@
// / ___ \ | | | (__ | | | || | ___) || |_| __/| (_| || | | | | || _|| (_| || | | | | | | |
// /_/ \_\|_| \___||_| |_||_||____/ \__|\___| \__,_||_| |_| |_||_| \__,_||_| |_| |_| |_|
// |
// Copyright 2015-2021 Łukasz "JustArchi" Domeradzki
// Copyright 2015-2022 Łukasz "JustArchi" Domeradzki
// Contact: JustArchi@JustArchi.net
// |
// Licensed under the Apache License, Version 2.0 (the "License");
@@ -20,6 +20,7 @@
// limitations under the License.
using System;
using System.ComponentModel;
using System.Diagnostics;
using System.Globalization;
using System.IO;
@@ -121,8 +122,8 @@ internal static class OS {
}
internal static void Init(GlobalConfig.EOptimizationMode optimizationMode) {
if (!Enum.IsDefined(typeof(GlobalConfig.EOptimizationMode), optimizationMode)) {
throw new ArgumentNullException(nameof(optimizationMode));
if (!Enum.IsDefined(optimizationMode)) {
throw new InvalidEnumArgumentException(nameof(optimizationMode), (int) optimizationMode, typeof(GlobalConfig.EOptimizationMode));
}
switch (optimizationMode) {
@@ -226,34 +227,67 @@ internal static class OS {
}
internal static bool VerifyEnvironment() {
#if NETFRAMEWORK
// This is .NET Framework build, we support that one only on mono for platforms not supported by .NET Core
// We're not going to analyze source builds, as we don't know what changes the author has made, assume they have a point
if (SharedInfo.BuildInfo.IsCustomBuild) {
return true;
}
// All windows variants have valid .NET Core build, and generic-netf is supported only on mono
if (OperatingSystem.IsWindows() || !RuntimeMadness.IsRunningOnMono) {
return false;
}
if (SharedInfo.BuildInfo.Variant.EndsWith("-netf", StringComparison.Ordinal)) {
#if NETFRAMEWORK
// All Windows variants (7+) have valid .NET Core build
if (OperatingSystem.IsWindows()) {
return false;
}
return RuntimeInformation.OSArchitecture switch {
// Sadly we can't tell a difference between ARMv6 and ARMv7 reliably, we'll believe that this linux-arm user knows what he's doing and he's indeed in need of generic-netf on ARMv6
Architecture.Arm => true,
// Non-Windows variants of generic-netf are supported only in Mono
if (!RuntimeMadness.IsRunningOnMono) {
return false;
}
// Apart from real x86, this also covers all unknown architectures, such as sparc, ppc64, and anything else Mono might support, we're fine with that
Architecture.X86 => true,
// Platforms not supported by .NET Core
return RuntimeInformation.OSArchitecture switch {
// Sadly we can't tell a difference between ARMv6 and ARMv7 reliably, we'll believe that this linux-arm user knows what he's doing and he's indeed in need of generic-netf on ARMv6
Architecture.Arm => true,
// Everything else is covered by .NET Core
_ => false
};
// Apart from real x86, this also covers all unknown architectures, such as sparc, ppc64, and anything else Mono might support, we're fine with that
Architecture.X86 => true,
// Everything else is covered by .NET Core
_ => false
};
#else
// This is .NET Core build, we support all scenarios
return true;
// .NET Framework build running on .NET Core? Very funny - only if somebody lied during build process
ASF.ArchiLogger.LogGenericError(string.Format(CultureInfo.CurrentCulture, Strings.WarningUnknownValuePleaseReport, nameof(SharedInfo.BuildInfo.Variant), SharedInfo.BuildInfo.Variant));
return false;
#endif
}
if (SharedInfo.BuildInfo.Variant == "generic") {
// Generic is supported everywhere
return true;
}
if ((SharedInfo.BuildInfo.Variant == "docker") || SharedInfo.BuildInfo.Variant.StartsWith("linux-", StringComparison.Ordinal)) {
// OS-specific Linux and Docker builds are supported only on Linux
return OperatingSystem.IsLinux();
}
if (SharedInfo.BuildInfo.Variant.StartsWith("osx-", StringComparison.Ordinal)) {
// OS-specific macOS build is supported only on macOS
return OperatingSystem.IsMacOS();
}
if (SharedInfo.BuildInfo.Variant.StartsWith("win-", StringComparison.Ordinal)) {
// OS-specific Windows build is supported only on Windows
return OperatingSystem.IsWindows();
}
// Unknown combination, we intend to cover all of the available ones above, so this results in an error
ASF.ArchiLogger.LogGenericError(string.Format(CultureInfo.CurrentCulture, Strings.WarningUnknownValuePleaseReport, nameof(SharedInfo.BuildInfo.Variant), SharedInfo.BuildInfo.Variant));
return false;
}
[SupportedOSPlatform("Windows")]

View File

@@ -4,7 +4,7 @@
// / ___ \ | | | (__ | | | || | ___) || |_| __/| (_| || | | | | || _|| (_| || | | | | | | |
// /_/ \_\|_| \___||_| |_||_||____/ \__|\___| \__,_||_| |_| |_||_| \__,_||_| |_| |_| |_|
// |
// Copyright 2015-2021 Łukasz "JustArchi" Domeradzki
// Copyright 2015-2022 Łukasz "JustArchi" Domeradzki
// Contact: JustArchi@JustArchi.net
// |
// Licensed under the Apache License, Version 2.0 (the "License");
@@ -41,7 +41,7 @@ using ArchiSteamFarm.Web;
namespace ArchiSteamFarm.Core;
internal sealed class Statistics : IAsyncDisposable {
internal sealed class RemoteCommunication : IAsyncDisposable {
private const ushort MaxItemsForFairBots = ArchiWebHandler.MaxItemsInSingleInventoryRequest * WebBrowser.MaxTries; // Determines which fair bots we'll deprioritize when matching due to excessive number of inventory requests they need to make, which are likely to fail in the process or cause excessive delays
private const byte MaxMatchedBotsHard = 40; // Determines how many bots we can attempt to match in total, where match attempt is equal to analyzing bot's inventory
private const byte MaxMatchingRounds = 10; // Determines maximum amount of matching rounds we're going to consider before leaving the rest of work for the next batch
@@ -61,7 +61,7 @@ internal sealed class Statistics : IAsyncDisposable {
private readonly SemaphoreSlim MatchActivelySemaphore = new(1, 1);
#pragma warning disable CA2213 // False positive, .NET Framework can't understand DisposeAsync()
private readonly Timer MatchActivelyTimer;
private readonly Timer? MatchActivelyTimer;
#pragma warning restore CA2213 // False positive, .NET Framework can't understand DisposeAsync()
private readonly SemaphoreSlim RequestsSemaphore = new(1, 1);
@@ -71,25 +71,33 @@ internal sealed class Statistics : IAsyncDisposable {
private DateTime LastPersonaStateRequest;
private bool ShouldSendHeartBeats;
internal Statistics(Bot bot) {
internal RemoteCommunication(Bot bot) {
Bot = bot ?? throw new ArgumentNullException(nameof(bot));
MatchActivelyTimer = new Timer(
MatchActively,
null,
TimeSpan.FromHours(1) + TimeSpan.FromSeconds(ASF.LoadBalancingDelay * Bot.Bots?.Count ?? 0), // Delay
TimeSpan.FromHours(8) // Period
);
if (Bot.BotConfig.TradingPreferences.HasFlag(BotConfig.ETradingPreferences.MatchActively)) {
MatchActivelyTimer = new Timer(
MatchActively,
null,
TimeSpan.FromHours(1) + TimeSpan.FromSeconds(ASF.LoadBalancingDelay * Bot.Bots?.Count ?? 0), // Delay
TimeSpan.FromHours(8) // Period
);
}
}
public async ValueTask DisposeAsync() {
MatchActivelySemaphore.Dispose();
RequestsSemaphore.Dispose();
await MatchActivelyTimer.DisposeAsync().ConfigureAwait(false);
if (MatchActivelyTimer != null) {
await MatchActivelyTimer.DisposeAsync().ConfigureAwait(false);
}
}
internal async Task OnHeartBeat() {
if (!Bot.BotConfig.RemoteCommunication.HasFlag(BotConfig.ERemoteCommunication.PublicListing)) {
return;
}
// Request persona update if needed
if ((DateTime.UtcNow > LastPersonaStateRequest.AddHours(MinPersonaStateTTL)) && (DateTime.UtcNow > LastAnnouncementCheck.AddHours(MinAnnouncementCheckTTL))) {
LastPersonaStateRequest = DateTime.UtcNow;
@@ -125,12 +133,20 @@ internal sealed class Statistics : IAsyncDisposable {
}
internal async Task OnLoggedOn() {
if (!Bot.BotConfig.RemoteCommunication.HasFlag(BotConfig.ERemoteCommunication.SteamGroup)) {
return;
}
if (!await Bot.ArchiWebHandler.JoinGroup(SharedInfo.ASFGroupSteamID).ConfigureAwait(false)) {
Bot.ArchiLogger.LogGenericWarning(string.Format(CultureInfo.CurrentCulture, Strings.WarningFailedWithError, nameof(ArchiWebHandler.JoinGroup)));
}
}
internal async Task OnPersonaState(string? nickname = null, string? avatarHash = null) {
if (!Bot.BotConfig.RemoteCommunication.HasFlag(BotConfig.ERemoteCommunication.PublicListing)) {
return;
}
if ((DateTime.UtcNow < LastAnnouncementCheck.AddHours(MinAnnouncementCheckTTL)) && (ShouldSendHeartBeats || (LastHeartBeat == DateTime.MinValue))) {
return;
}
@@ -171,7 +187,7 @@ internal sealed class Statistics : IAsyncDisposable {
HashSet<Asset.EType> acceptedMatchableTypes = Bot.BotConfig.MatchableTypes.Where(AcceptedMatchableTypes.Contains).ToHashSet();
if (acceptedMatchableTypes.Count == 0) {
Bot.ArchiLogger.LogNullError(nameof(acceptedMatchableTypes));
Bot.ArchiLogger.LogNullError(acceptedMatchableTypes);
LastAnnouncementCheck = DateTime.UtcNow;
ShouldSendHeartBeats = false;
@@ -229,12 +245,20 @@ internal sealed class Statistics : IAsyncDisposable {
}
private async Task<bool?> IsEligibleForListing() {
// Bot must be eligible for matching first
bool? isEligibleForMatching = await IsEligibleForMatching().ConfigureAwait(false);
if (isEligibleForMatching != true) {
return isEligibleForMatching;
}
// Bot must have STM enabled in TradingPreferences
if (!Bot.BotConfig.TradingPreferences.HasFlag(BotConfig.ETradingPreferences.SteamTradeMatcher)) {
Bot.ArchiLogger.LogGenericTrace(string.Format(CultureInfo.CurrentCulture, Strings.WarningFailedWithError, $"{nameof(Bot.BotConfig.TradingPreferences)}: {Bot.BotConfig.TradingPreferences}"));
return false;
}
// Bot must have public inventory
bool? hasPublicInventory = await Bot.HasPublicInventory().ConfigureAwait(false);
@@ -255,13 +279,6 @@ internal sealed class Statistics : IAsyncDisposable {
return false;
}
// Bot must have STM enable in TradingPreferences
if (!Bot.BotConfig.TradingPreferences.HasFlag(BotConfig.ETradingPreferences.SteamTradeMatcher)) {
Bot.ArchiLogger.LogGenericTrace(string.Format(CultureInfo.CurrentCulture, Strings.WarningFailedWithError, $"{nameof(Bot.BotConfig.TradingPreferences)}: {Bot.BotConfig.TradingPreferences}"));
return false;
}
// Bot must have at least one accepted matchable type set
if ((Bot.BotConfig.MatchableTypes.Count == 0) || Bot.BotConfig.MatchableTypes.All(static type => !AcceptedMatchableTypes.Contains(type))) {
Bot.ArchiLogger.LogGenericTrace(string.Format(CultureInfo.CurrentCulture, Strings.WarningFailedWithError, $"{nameof(Bot.BotConfig.MatchableTypes)}: {string.Join(", ", Bot.BotConfig.MatchableTypes)}"));
@@ -342,9 +359,7 @@ internal sealed class Statistics : IAsyncDisposable {
throw new ArgumentNullException(nameof(acceptedMatchableTypes));
}
if (triedSteamIDs == null) {
throw new ArgumentNullException(nameof(triedSteamIDs));
}
ArgumentNullException.ThrowIfNull(triedSteamIDs);
HashSet<Asset> ourInventory;
@@ -401,15 +416,15 @@ internal sealed class Statistics : IAsyncDisposable {
Bot.ArchiLogger.LogGenericTrace($"{listedUser.SteamID}...");
byte? holdDuration = await Bot.ArchiWebHandler.GetTradeHoldDurationForUser(listedUser.SteamID, listedUser.TradeToken).ConfigureAwait(false);
byte? tradeHoldDuration = await Bot.ArchiWebHandler.GetCombinedTradeHoldDurationAgainstUser(listedUser.SteamID, listedUser.TradeToken).ConfigureAwait(false);
switch (holdDuration) {
switch (tradeHoldDuration) {
case null:
Bot.ArchiLogger.LogGenericTrace(string.Format(CultureInfo.CurrentCulture, Strings.ErrorIsEmpty, nameof(holdDuration)));
Bot.ArchiLogger.LogGenericTrace(string.Format(CultureInfo.CurrentCulture, Strings.ErrorIsEmpty, nameof(tradeHoldDuration)));
continue;
case > 0 when holdDuration.Value > maxTradeHoldDuration:
Bot.ArchiLogger.LogGenericTrace($"{holdDuration.Value} > {maxTradeHoldDuration}");
case > 0 when (tradeHoldDuration.Value > maxTradeHoldDuration) || (tradeHoldDuration.Value > listedUser.MaxTradeHoldDuration):
Bot.ArchiLogger.LogGenericTrace($"{tradeHoldDuration.Value} > {maxTradeHoldDuration} || {listedUser.MaxTradeHoldDuration}");
continue;
}
@@ -417,7 +432,7 @@ internal sealed class Statistics : IAsyncDisposable {
HashSet<Asset> theirInventory;
try {
theirInventory = await Bot.ArchiWebHandler.GetInventoryAsync(listedUser.SteamID).Where(item => (!listedUser.MatchEverything || item.Tradable) && wantedSets.Contains((item.RealAppID, item.Type, item.Rarity)) && ((holdDuration.Value == 0) || !(item.Type is Asset.EType.FoilTradingCard or Asset.EType.TradingCard && CardsFarmer.SalesBlacklist.Contains(item.RealAppID)))).ToHashSetAsync().ConfigureAwait(false);
theirInventory = await Bot.ArchiWebHandler.GetInventoryAsync(listedUser.SteamID).Where(item => (!listedUser.MatchEverything || item.Tradable) && wantedSets.Contains((item.RealAppID, item.Type, item.Rarity)) && ((tradeHoldDuration.Value == 0) || !(item.Type is Asset.EType.FoilTradingCard or Asset.EType.TradingCard && CardsFarmer.SalesBlacklist.Contains(item.RealAppID)))).ToHashSetAsync().ConfigureAwait(false);
} catch (HttpRequestException e) {
Bot.ArchiLogger.LogGenericWarningException(e);
@@ -465,7 +480,7 @@ internal sealed class Statistics : IAsyncDisposable {
if (inventoryStateChanges.TryGetValue(set, out Dictionary<ulong, uint>? pastChanges) && (pastChanges.Count > 0)) {
foreach ((ulong classID, uint amount) in pastChanges) {
if (!ourFullSet.TryGetValue(classID, out uint fullAmount) || (fullAmount == 0) || (fullAmount < amount)) {
Bot.ArchiLogger.LogNullError(nameof(fullAmount));
Bot.ArchiLogger.LogNullError(fullAmount);
return (false, skippedSetsThisRound.Count > 0);
}
@@ -477,7 +492,7 @@ internal sealed class Statistics : IAsyncDisposable {
}
if (!ourTradableSet.TryGetValue(classID, out uint tradableAmount) || (tradableAmount == 0) || (tradableAmount < amount)) {
Bot.ArchiLogger.LogNullError(nameof(tradableAmount));
Bot.ArchiLogger.LogNullError(tradableAmount);
return (false, skippedSetsThisRound.Count > 0);
}

View File

@@ -4,7 +4,7 @@
// / ___ \ | | | (__ | | | || | ___) || |_| __/| (_| || | | | | || _|| (_| || | | | | | | |
// /_/ \_\|_| \___||_| |_||_||____/ \__|\___| \__,_||_| |_| |_||_| \__,_||_| |_| |_| |_|
// |
// Copyright 2015-2021 Łukasz "JustArchi" Domeradzki
// Copyright 2015-2022 Łukasz "JustArchi" Domeradzki
// Contact: JustArchi@JustArchi.net
// |
// Licensed under the Apache License, Version 2.0 (the "License");
@@ -51,9 +51,7 @@ public static class Utilities {
[PublicAPI]
public static string GetArgsAsText(string[] args, byte argsToSkip, string delimiter) {
if (args == null) {
throw new ArgumentNullException(nameof(args));
}
ArgumentNullException.ThrowIfNull(args);
if (args.Length <= argsToSkip) {
throw new InvalidOperationException($"{nameof(args.Length)} && {nameof(argsToSkip)}");
@@ -79,13 +77,8 @@ public static class Utilities {
[PublicAPI]
public static string? GetCookieValue(this CookieContainer cookieContainer, Uri uri, string name) {
if (cookieContainer == null) {
throw new ArgumentNullException(nameof(cookieContainer));
}
if (uri == null) {
throw new ArgumentNullException(nameof(uri));
}
ArgumentNullException.ThrowIfNull(cookieContainer);
ArgumentNullException.ThrowIfNull(uri);
if (string.IsNullOrEmpty(name)) {
throw new ArgumentNullException(nameof(name));
@@ -101,13 +94,11 @@ public static class Utilities {
}
[PublicAPI]
public static uint GetUnixTime() => (uint) DateTimeOffset.UtcNow.ToUnixTimeSeconds();
public static ulong GetUnixTime() => (ulong) DateTimeOffset.UtcNow.ToUnixTimeSeconds();
[PublicAPI]
public static async void InBackground(Action action, bool longRunning = false) {
if (action == null) {
throw new ArgumentNullException(nameof(action));
}
ArgumentNullException.ThrowIfNull(action);
TaskCreationOptions options = TaskCreationOptions.DenyChildAttach;
@@ -119,25 +110,15 @@ public static class Utilities {
}
[PublicAPI]
public static async void InBackground<T>(Func<T> function, bool longRunning = false) {
if (function == null) {
throw new ArgumentNullException(nameof(function));
}
public static void InBackground<T>(Func<T> function, bool longRunning = false) {
ArgumentNullException.ThrowIfNull(function);
TaskCreationOptions options = TaskCreationOptions.DenyChildAttach;
if (longRunning) {
options |= TaskCreationOptions.LongRunning | TaskCreationOptions.PreferFairness;
}
await Task.Factory.StartNew(function, CancellationToken.None, options, TaskScheduler.Default).ConfigureAwait(false);
InBackground(void() => function(), longRunning);
}
[PublicAPI]
public static async Task<IList<T>> InParallel<T>(IEnumerable<Task<T>> tasks) {
if (tasks == null) {
throw new ArgumentNullException(nameof(tasks));
}
ArgumentNullException.ThrowIfNull(tasks);
IList<T> results;
@@ -161,9 +142,7 @@ public static class Utilities {
[PublicAPI]
public static async Task InParallel(IEnumerable<Task> tasks) {
if (tasks == null) {
throw new ArgumentNullException(nameof(tasks));
}
ArgumentNullException.ThrowIfNull(tasks);
switch (ASF.GlobalConfig?.OptimizationMode) {
case GlobalConfig.EOptimizationMode.MinMemoryUsage:
@@ -182,6 +161,9 @@ public static class Utilities {
[PublicAPI]
public static bool IsClientErrorCode(this HttpStatusCode statusCode) => statusCode is >= HttpStatusCode.BadRequest and < HttpStatusCode.InternalServerError;
[PublicAPI]
public static bool IsRedirectionCode(this HttpStatusCode statusCode) => statusCode is >= HttpStatusCode.Ambiguous and < HttpStatusCode.BadRequest;
[PublicAPI]
public static bool IsServerErrorCode(this HttpStatusCode statusCode) => statusCode is >= HttpStatusCode.InternalServerError and < (HttpStatusCode) 600;
@@ -208,21 +190,21 @@ public static class Utilities {
[PublicAPI]
public static IEnumerable<IElement> SelectNodes(this IDocument document, string xpath) {
if (document == null) {
throw new ArgumentNullException(nameof(document));
}
ArgumentNullException.ThrowIfNull(document);
return document.Body.SelectNodes(xpath).OfType<IElement>();
}
[PublicAPI]
public static IElement? SelectSingleElementNode(this IElement element, string xpath) => (IElement?) element.SelectSingleNode(xpath);
public static IElement? SelectSingleElementNode(this IElement element, string xpath) {
ArgumentNullException.ThrowIfNull(element);
return (IElement?) element.SelectSingleNode(xpath);
}
[PublicAPI]
public static IElement? SelectSingleNode(this IDocument document, string xpath) {
if (document == null) {
throw new ArgumentNullException(nameof(document));
}
ArgumentNullException.ThrowIfNull(document);
return (IElement?) document.Body.SelectSingleNode(xpath);
}
@@ -237,9 +219,7 @@ public static class Utilities {
[PublicAPI]
public static Task<T> ToLongRunningTask<T>(this AsyncJob<T> job) where T : CallbackMsg {
if (job == null) {
throw new ArgumentNullException(nameof(job));
}
ArgumentNullException.ThrowIfNull(job);
job.Timeout = TimeSpan.FromSeconds(TimeoutForLongRunningTasksInSeconds);
@@ -248,9 +228,7 @@ public static class Utilities {
[PublicAPI]
public static Task<AsyncJobMultiple<T>.ResultSet> ToLongRunningTask<T>(this AsyncJobMultiple<T> job) where T : CallbackMsg {
if (job == null) {
throw new ArgumentNullException(nameof(job));
}
ArgumentNullException.ThrowIfNull(job);
job.Timeout = TimeSpan.FromSeconds(TimeoutForLongRunningTasksInSeconds);
@@ -279,6 +257,14 @@ public static class Utilities {
}
}
internal static ulong MathAdd(ulong first, int second) {
if (second >= 0) {
return first + (uint) second;
}
return first - (uint) -second;
}
internal static bool RelativeDirectoryStartsWith(string directory, params string[] prefixes) {
if (string.IsNullOrEmpty(directory)) {
throw new ArgumentNullException(nameof(directory));
@@ -305,21 +291,36 @@ public static class Utilities {
}
Result result = Zxcvbn.Core.EvaluatePassword(password, forbiddenPhrases);
FeedbackItem feedback = result.Feedback;
return (result.Score < 4, string.IsNullOrEmpty(feedback.Warning) ? feedback.Suggestions.FirstOrDefault() : feedback.Warning);
IList<string>? suggestions = result.Feedback.Suggestions;
if (!string.IsNullOrEmpty(result.Feedback.Warning)) {
suggestions ??= new List<string>(1);
suggestions.Insert(0, result.Feedback.Warning);
}
if (suggestions != null) {
for (byte i = 0; i < suggestions.Count; i++) {
string suggestion = suggestions[i];
if ((suggestion.Length == 0) || (suggestion[^1] == '.')) {
continue;
}
suggestions[i] = $"{suggestion}.";
}
}
return (result.Score < 4, suggestions is { Count: > 0 } ? string.Join(" ", suggestions.Where(static suggestion => suggestion.Length > 0)) : null);
}
internal static void WarnAboutIncompleteTranslation(ResourceManager resourceManager) {
if (resourceManager == null) {
throw new ArgumentNullException(nameof(resourceManager));
}
ArgumentNullException.ThrowIfNull(resourceManager);
// Skip translation progress for English and invariant (such as "C") cultures
switch (CultureInfo.CurrentUICulture.TwoLetterISOLanguageName) {
case "en":
case "iv":
case "qps":
case "en" or "iv" or "qps":
return;
}
@@ -327,7 +328,7 @@ public static class Utilities {
ResourceSet? defaultResourceSet = resourceManager.GetResourceSet(CultureInfo.GetCultureInfo("en-US"), true, true);
if (defaultResourceSet == null) {
ASF.ArchiLogger.LogNullError(nameof(defaultResourceSet));
ASF.ArchiLogger.LogNullError(defaultResourceSet);
return;
}
@@ -335,7 +336,7 @@ public static class Utilities {
HashSet<DictionaryEntry> defaultStringObjects = defaultResourceSet.Cast<DictionaryEntry>().ToHashSet();
if (defaultStringObjects.Count == 0) {
ASF.ArchiLogger.LogNullError(nameof(defaultStringObjects));
ASF.ArchiLogger.LogNullError(defaultStringObjects);
return;
}
@@ -344,7 +345,7 @@ public static class Utilities {
ResourceSet? currentResourceSet = resourceManager.GetResourceSet(CultureInfo.CurrentUICulture, true, true);
if (currentResourceSet == null) {
ASF.ArchiLogger.LogNullError(nameof(currentResourceSet));
ASF.ArchiLogger.LogNullError(currentResourceSet);
return;
}

View File

@@ -4,7 +4,7 @@
// / ___ \ | | | (__ | | | || | ___) || |_| __/| (_| || | | | | || _|| (_| || | | | | | | |
// /_/ \_\|_| \___||_| |_||_||____/ \__|\___| \__,_||_| |_| |_||_| \__,_||_| |_| |_| |_|
// |
// Copyright 2015-2021 Łukasz "JustArchi" Domeradzki
// Copyright 2015-2022 Łukasz "JustArchi" Domeradzki
// Contact: JustArchi@JustArchi.net
// |
// Licensed under the Apache License, Version 2.0 (the "License");
@@ -48,7 +48,7 @@ public sealed class ArchiCacheable<T> : IDisposable {
[PublicAPI]
public async Task<(bool Success, T? Result)> GetValue(EFallback fallback = EFallback.DefaultForType) {
if (!Enum.IsDefined(typeof(EFallback), fallback)) {
if (!Enum.IsDefined(fallback)) {
throw new InvalidEnumArgumentException(nameof(fallback), (int) fallback, typeof(EFallback));
}

View File

@@ -4,7 +4,7 @@
// / ___ \ | | | (__ | | | || | ___) || |_| __/| (_| || | | | | || _|| (_| || | | | | | | |
// /_/ \_\|_| \___||_| |_||_||____/ \__|\___| \__,_||_| |_| |_||_| \__,_||_| |_| |_| |_|
// |
// Copyright 2015-2021 Łukasz "JustArchi" Domeradzki
// Copyright 2015-2022 Łukasz "JustArchi" Domeradzki
// Contact: JustArchi@JustArchi.net
// |
// Licensed under the Apache License, Version 2.0 (the "License");
@@ -60,7 +60,7 @@ public static class ArchiCryptoHelper {
private static byte[] EncryptionKey = Encoding.UTF8.GetBytes(nameof(ArchiSteamFarm));
internal static async Task<string?> Decrypt(ECryptoMethod cryptoMethod, string encryptedString) {
if (!Enum.IsDefined(typeof(ECryptoMethod), cryptoMethod)) {
if (!Enum.IsDefined(cryptoMethod)) {
throw new InvalidEnumArgumentException(nameof(cryptoMethod), (int) cryptoMethod, typeof(ECryptoMethod));
}
@@ -79,7 +79,7 @@ public static class ArchiCryptoHelper {
}
internal static string? Encrypt(ECryptoMethod cryptoMethod, string decryptedString) {
if (!Enum.IsDefined(typeof(ECryptoMethod), cryptoMethod)) {
if (!Enum.IsDefined(cryptoMethod)) {
throw new InvalidEnumArgumentException(nameof(cryptoMethod), (int) cryptoMethod, typeof(ECryptoMethod));
}
@@ -98,7 +98,7 @@ public static class ArchiCryptoHelper {
}
internal static string Hash(EHashingMethod hashingMethod, string stringToHash) {
if (!Enum.IsDefined(typeof(EHashingMethod), hashingMethod)) {
if (!Enum.IsDefined(hashingMethod)) {
throw new InvalidEnumArgumentException(nameof(hashingMethod), (int) hashingMethod, typeof(EHashingMethod));
}
@@ -129,7 +129,7 @@ public static class ArchiCryptoHelper {
throw new ArgumentOutOfRangeException(nameof(hashLength));
}
if (!Enum.IsDefined(typeof(EHashingMethod), hashingMethod)) {
if (!Enum.IsDefined(hashingMethod)) {
throw new InvalidEnumArgumentException(nameof(hashingMethod), (int) hashingMethod, typeof(EHashingMethod));
}
@@ -159,11 +159,15 @@ public static class ArchiCryptoHelper {
throw new ArgumentNullException(nameof(passwordHash));
}
if (passwordHash.Length > byte.MaxValue) {
throw new ArgumentOutOfRangeException(nameof(passwordHash));
}
if ((salt == null) || (salt.Length == 0)) {
throw new ArgumentNullException(nameof(salt));
}
if (!Enum.IsDefined(typeof(EHashingMethod), hashingMethod)) {
if (!Enum.IsDefined(hashingMethod)) {
throw new InvalidEnumArgumentException(nameof(hashingMethod), (int) hashingMethod, typeof(EHashingMethod));
}

View File

@@ -4,7 +4,7 @@
// / ___ \ | | | (__ | | | || | ___) || |_| __/| (_| || | | | | || _|| (_| || | | | | | | |
// /_/ \_\|_| \___||_| |_||_||____/ \__|\___| \__,_||_| |_| |_||_| \__,_||_| |_| |_| |_|
// |
// Copyright 2015-2021 Łukasz "JustArchi" Domeradzki
// Copyright 2015-2022 Łukasz "JustArchi" Domeradzki
// Contact: JustArchi@JustArchi.net
// |
// Licensed under the Apache License, Version 2.0 (the "License");
@@ -113,6 +113,10 @@ internal sealed class CrossProcessFileBasedSemaphore : ICrossProcessSemaphore, I
try {
stopwatch.Stop();
if (stopwatch.ElapsedMilliseconds >= int.MaxValue) {
return false;
}
millisecondsTimeout -= (int) stopwatch.ElapsedMilliseconds;
if (millisecondsTimeout <= 0) {
@@ -158,7 +162,7 @@ internal sealed class CrossProcessFileBasedSemaphore : ICrossProcessSemaphore, I
string? directoryPath = Path.GetDirectoryName(FilePath);
if (string.IsNullOrEmpty(directoryPath)) {
ASF.ArchiLogger.LogNullError(nameof(directoryPath));
ASF.ArchiLogger.LogNullError(directoryPath);
return;
}

View File

@@ -4,7 +4,7 @@
// / ___ \ | | | (__ | | | || | ___) || |_| __/| (_| || | | | | || _|| (_| || | | | | | | |
// /_/ \_\|_| \___||_| |_||_||____/ \__|\___| \__,_||_| |_| |_||_| \__,_||_| |_| |_| |_|
// |
// Copyright 2015-2021 Łukasz "JustArchi" Domeradzki
// Copyright 2015-2022 Łukasz "JustArchi" Domeradzki
// Contact: JustArchi@JustArchi.net
// |
// Licensed under the Apache License, Version 2.0 (the "License");

Some files were not shown because too many files have changed in this diff Show More