Commit Graph

132 Commits

Author SHA1 Message Date
JustArchi
e1e9a9f457 Rider cleanup 2019-01-14 19:11:17 +01:00
JustArchi
192656cd02 Implement basic code contracts 2019-01-10 23:44:32 +01:00
Łukasz Domeradzki
0f2a816b92 Implement plugin system (#1020)
* Implement basic plugin system

* The dawn of new era

* Add plugins warning

* Move more members to PublicAPI

* Open commands for the plugins

* Add IBotHackNewChat

* Run plugin events in parallel

* Use properties in IPlugin

* Hook our custom plugin into CI to ensure it compiles

* Fix dotnet brain damage

* Add IBotsComparer

* Add code documentation

* Add IBotTradeOffer

* Add IBotTradeOffer example

* Add IBotTradeOfferResults

* Final bulletproofing

* Final renaming
2019-01-10 22:33:07 +01:00
JustArchi
3bbddcf723 Happy new year 🎉 2019-01-02 16:32:53 +01:00
JustArchi
f8aa8babcf R# cleanup 2018-12-15 00:27:15 +01:00
JustArchi
6ef8093b19 Cleanup 2018-11-19 15:33:29 +01:00
Vital7
25dcccdb54 Add method to get trade token by using Steamkit (#947)
* Fix NullReferenceException in AcceptConfirmations()

* Add method to get trade token by using steamkit

* Remove AWH way to get token and caching it

* Accidentally removed some logic, fix
2018-11-19 15:16:35 +01:00
MisakaDev
ab6ce7c7e5 Add !level command (#946)
* add !level command

* Added blank lines

* Fix https://github.com/JustArchiNET/ArchiSteamFarm/pull/946

* Fix №2 https://github.com/JustArchiNET/ArchiSteamFarm/pull/946
2018-11-14 20:51:21 +01:00
JustArchi
362f4db10d Add /Bot/Redeem API endpoint
@ASF-ui
2018-10-29 21:43:44 +01:00
JustArchi
6747599b6e Misc 2018-09-27 00:17:52 +02:00
JustArchi
2e31d7ff39 Improve rate limit of messaging 2018-09-27 00:09:00 +02:00
JustArchi
a04fb33343 Structure cleanup 2018-09-08 01:03:55 +02:00
JustArchi
9534d2b9f0 R# cleanup 2018-09-08 00:46:40 +02:00
JustArchi
16d002f99b Misc code cleanup 2018-07-27 04:52:14 +02:00
JustArchi
626e51d2dd Get SteamMasterChatGroupID automatically
Alexa this is so good, play a-TTTempo - TOHO FULL SWING 2 - THMNK you.
2018-07-25 17:11:19 +02:00
JustArchi
ae669b04da Add missing logic related to escaping private messages 2018-07-25 01:01:15 +02:00
Łukasz Domeradzki
0ffcedcf01 Implement support for new Steam chat (#811)
* First proof of concept

Still missing friends interaction

* Misc

* Add missing bits

* Misc

* Misc

* Misc

* Misc

* Handle new max message length

* AH bits for messages ack

* Implement MarkReceivedMessagesAsRead

* Mark notifications appropriately

* Remove obsolete callback subscriptions

* Correct NoResponse functions

* Adapt new code to beta format

* Implement advanced chat logging functionality

* Improve message handling

* Port naive escaping logic from ArchiBoT

* Cover edge cases

* Update lib

* Misc

* Kill more obsolete pragmas

* Update SK2 to official build

From https://ci.appveyor.com/project/SteamRE/steamkit/build/2.1.0.649/job/osamyjpyf7v9ot7k/artifacts

* Packages update

* SteamTarget changes

Single responsibility + fix of required parameters
2018-07-24 23:43:25 +02:00
JustArchi
ca0d6575d8 Packages update 2018-07-11 16:31:46 +02:00
JustArchi
dfb90624e8 R# Code cleanup 2018-06-16 07:47:07 +02:00
JustArchi
47d575e82d Implement logic for dynamic VanityURL changing from ArchiBoT 2018-06-11 21:40:52 +02:00
JustArchi
34b609e6f0 Use new ToHashSet() method 2018-06-09 00:45:15 +02:00
JustArchi
c775b69d50 ArchiBoT/ASF code unification 2018-04-23 23:17:56 +02:00
JustArchi
08839e61fc ArchiBoT/ASF code unification 2018-04-23 22:24:14 +02:00
JustArchi
66c80e618f Closes #764 2018-04-13 09:17:27 +02:00
JustArchi
8ec900147e Misc 2018-03-06 10:14:48 +01:00
JustArchi
1a2c2abb78 Allow one more game to be played when custom gameName is used 2018-03-04 07:29:27 +01:00
JustArchi
5300e5c2b1 Misc 2018-01-21 23:19:30 +01:00
JustArchi
6bbff6ab4e Happy new year 2018-01-01 02:56:53 +01:00
JustArchi
319fe69088 Don't keep SteamTimeDifference infinitely
With long-running systems time might run out of sync eventually.
2017-12-17 11:31:42 +01:00
JustArchi
f21a998bbb Test for double fine adventure 2017-12-15 10:37:51 +01:00
JustArchi
b6da399c89 Rename notifications body
Try to stick with Valve's naming for this one.
2017-12-01 01:36:58 +01:00
JustArchi
97c1a7a1a6 Improve error routine
This way we avoid slow reflection-based Enum.IsDefined() while covering out-of-range values.
2017-12-01 01:01:02 +01:00
JustArchi
d07d82438f Update ENotification
According to https://github.com/SteamRE/SteamKit/issues/493
2017-12-01 00:49:19 +01:00
JustArchi
16d3ca7a8f Add unrecognized event type
https://github.com/SteamRE/SteamKit/issues/493
2017-12-01 00:16:54 +01:00
JustArchi
38877f1c0e Simplify notifications structure 2017-11-18 23:55:11 +01:00
JustArchi
e3bc01bc44 Follow-up bugfix to 2d767c41aa 2017-11-18 20:35:57 +01:00
JustArchi
d5f44f8f6c ReSharper: update header 2017-11-18 17:27:06 +01:00
JustArchi
2d767c41aa Fix latest Steam notifications fuckup
Initially the issue was observed in #697, but that itself wasn't exactly what was fixed here, as multiple evaluation of the same trade is still wanted scenario.

The real issue was reported in http://steamcommunity.com/groups/ascfarm/discussions/1/2425614539578192287/

In a huge TL;DR, Steam is now sending trades notification each time something fetches current trade offers, be it ASF, the user, or some other script.

This will lead to possible ASF trade loop, as we'll get wanted notification about new trades, fetch them, leave some trades untouched, get new notification about trades and so on.

Initially I wanted to fix this in dirty way by just ignoring any extra notifications that happened since API call until 5 extra seconds after we were done with entire parsing, but I found much better solution - Steam actually includes extra info about amount of trades/items in notification (makes sense, since Steam client displays that info too). We can make use of that info and simply ignore any extra notification that results in same or smaller count.

Thanks to that we didn't only add a decent workaround for this recent Steam fuckup, but we also improved internal ASF code that will no longer schedule extra parsing if we accepted/rejected only some of the trades, making me happy with the actual solution.
2017-11-18 17:20:24 +01:00
JustArchi
10ffd242cd ReSharper ignored warnings review 2017-09-21 03:16:42 +02:00
JustArchi
aacf491a0c Improve relability of CustomGamePlayed
It's freaking unbelievable that I found a root cause of that.
2017-08-23 17:04:12 +02:00
JustArchi
f564cc5ebb Update ASF base code to SK 2.0 alpha5
There is a lot of changes in this one, I like how we got rid of SteamProtocol and got SteamProtocols instead.
2017-07-21 02:13:03 +02:00
JustArchi
88a7d2e7e9 Code cleanup 2017-07-09 09:09:46 +02:00
JustArchi
9aa36f1a03 Code style update/fixes 2017-07-03 12:14:23 +02:00
JustArchi
76a98c09e8 Misc 2017-05-31 21:49:42 +02:00
JustArchi
ac3daf7369 Optimize offline messages
This is something I stumbled upon by accident when analyzing things in ArchiBoT.
Valve actually does tell us all steamIDs we have pending messages from BEFORE we even ask for offline messages, so we can use that info in order to check if there is actually anybody permitted to use commands, if not, we can skip asking for those messages as they'd not result in executing any command anyway, and this way we can skip marking messages as read when there is nothing interesting for us to see.
2017-05-30 00:30:04 +02:00
JustArchi
fcf9686a79 Revert "Resharper cleanup"
This reverts commit 7c8d7b5ada.

Bad cleanup.
2017-04-05 17:01:18 +02:00
JustArchi
7c8d7b5ada Resharper cleanup 2017-04-05 16:59:48 +02:00
JustArchi
c7515f9024 Post-merge Resharper fixes #501 2017-04-05 16:17:34 +02:00
Logerfo
e4da0c05d5 Merge branch 'master' into master 2017-04-05 10:33:13 -03:00
JustArchi
be164ad726 Fix JSON failures with wallet code redeem 2017-04-05 15:03:27 +02:00