Skip to content

Commit

Permalink
Update Readme.md, Add setting "useQueue"
Browse files Browse the repository at this point in the history
  • Loading branch information
quer committed Jan 8, 2023
1 parent 61f6f7a commit 7a754eb
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 99 deletions.
64 changes: 28 additions & 36 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,59 +2,48 @@
[![Steam Donate][steam-img]][steam-url]
[![Steam Profile][steam-account-img]][steam-account-url]

# Work still in progress
This branch is used to commit the changes i made to the core.

More info later.. But see how clean the Main.js now.. (
and you can run in cluster mode, to run more unit at once, and anti spam for steam have been built in, so even if there is 10 account at once, it will ensure there is no more then one call per sec. even when running async on all the accounts..
)

## Added new features
* Run in cluster mode. which allows you to run more account at once.
* Added better loggins with enriched details.
* Loggins can be saved now
* * Can be saved to a single file, for each run.
* * Can be splitted up to per each account, for each run. ( a log file for each account. )
* Added an anti spam for steam. so even if running multiple accounts at once, it will only send one request to steam at a time.
* * There is a Option to set how this should behave. default is talking 1 sec between requests. so it will calculate how long to hold the next request before fired.
* Added ability to run guard enabled accounts alongside free guard accounts. ( make sure to not add the "secret" file to auto login. )

## Known issues
* The console, will print only one account in some modules. This have something to do with async().

This project is to do multiple actions at once on Steam, whit multiple steam account
# Read the wiki for details
More details in the wiki, on how to setup, and use modules.

The complete module list is in the wike.
# The steam events on multiple accounts
Just add more accounts in the config.

# Modules
# Modules ( snippet )
read about each module in the wiki, on how to use!

* change profile settings
* * change setting on the general edit page (Edit Profile / chanceAccountSettings_general)
* * change profile avatar, from the games that it own, it will select a random one
* * change profile background, will take a random one that the account own, can also remove the bg
* * change mini profile, will take a random one that the account own
* * change profile theme, will take a random one that the account own
* * change profile favorite badge, will take a random one that the account own
* * change profile favorite group, will take a random one that the account own
* * change profile avatar, from the games that it own
* * change profile background
* * change mini profile
* * change profile theme
* * change profile favorite badge
* * change profile favorite group
* clear profile name alias
* change profile image (will select a radom from `http://steamcommunity.com/actions/GameAvatars/`) ( might be outdated, use the other one )
* vote and like a guide (just add id and appid in file)
* change profile image
* vote and like a guide
* join group
* LeaveGroup ( can also remove all groups from each account )
* Comment in a Guide
* add game to WishList
* comment on a profile
* game Recommend
* run queue
* ActivateFreeGame ( will active a entered free game)
* ActivateFreeGame
* remove all game from wishlist
* Give Awared/Rewards ( GiveSteamAward.js )
* Create badge (createBadge.js)
* Give Awared/Rewards
* Create badge
* Follow Games
* Unfollow Games
* Follow Curators
* UnFollow Curators
* Evaluating Game Review
* view broadcast
* Group Announcement Comment Add
* Group Announcement Comment Delete
* Group Announcement Rate

# Events
Events modules are stored in `modules/events`
Expand Down Expand Up @@ -90,6 +79,8 @@ And if needed change the module file.

And then run `node main`

Read more in the Wiki

# To use
## Running Modes
There is a few ways to run this.
Expand Down Expand Up @@ -120,6 +111,7 @@ modules.push('ActivateFreeGame');
## Settings
In the `main.js` you can tweak settings the way how it should be running.
The default settings are show below. ( Also can be foung in `lib/Setting.js`).
To understand what each setting do, read about it in the [Wiki by clicking here](https://github.com/quer/the-steam-awards/wiki/Configuration)
```js
{
AuthFieldNameUsername: "steam_user",
Expand All @@ -140,20 +132,21 @@ The default settings are show below. ( Also can be foung in `lib/Setting.js`).
clusterSize: 4
},
Request: {
UseQueue: false,
Time: 1000, // 1000 is 1 sec
Mode: Enums.Request.MinTimeBetweenRequest
}
}
```
There will be a wiki page explaining each setting.


## Login modes
There is 3 way to loging
* use username and password
* use username and password and 2fa
* use username and password and sentry file, once it have been loaded.

Read more on the wiki soon
Read more on the [wiki](https://github.com/quer/the-steam-awards/wiki/Setting-up), for specific settings

# Script
The scripts are made to save you time and effort for setting accounts into config.
Expand All @@ -164,8 +157,7 @@ If you do not use default settings, you have to add the setting in the files.
* `npm run ConvertFromLineFormat [FilePath]` -> will add account(s) from a text file has the format `username:password:sharedsecret:SpecialAccountText` (only username and password is mandatory)
* `npm run Totp [index]` -> will show the username and password. and the generated totp key, to login.

# Wiki
Read more in the wiki.
more in the [wiki](https://github.com/quer/the-steam-awards/wiki/Setting-up#running-mode)

# Web panel to contol the account
I have started to create a web panel to handle the bots,
Expand Down
1 change: 1 addition & 0 deletions lib/Settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ module.exports = new function () {
ClusterSize: 1
},
this.Request = {
UseQueue: false,
Time: 1000, // 1000 is 1 sec
Mode: this.Enums.Request.MinTimeBetweenRequest
}
Expand Down
74 changes: 12 additions & 62 deletions lib/request.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
const settings = require('./Settings');
const request = require('request');
var aQueue = require('./QueueSystem');

Expand Down Expand Up @@ -47,7 +48,11 @@ module.exports = function (url) {
resolve({error, response, body});
});
}.bind(this));
return aQueue.enqueue(requestPromise);
if(!settings.Request.UseQueue){
return requestPromise();
}else{
return aQueue.enqueue(requestPromise);
}
}
this.post = function(data, callback){
this.postPromise(data)
Expand Down Expand Up @@ -80,7 +85,12 @@ module.exports = function (url) {
resolve({error, response, body});
});
}.bind(this));
return aQueue.enqueue(requestPromise);

if(!settings.Request.UseQueue){
return requestPromise;
}else{
return aQueue.enqueue(requestPromise);
}
}
this.get = function(data, callback){
this.getPromise(data)
Expand All @@ -107,63 +117,3 @@ module.exports = function (url) {
});
}
}
/*
var http = require('http');
module.exports = function (url) {
this.url = url;
this.client = http.createClient(80, url);
this.CooliesList = [];
this.Types = {
GET: 0,
POST: 1
}
this.postNoQueue = function (url, data) {
return this.CreateRequest(this.Types.POST, url, data);
}
this.post = function (url, data) {
var requestPromise = new Promise(function (resolve, reject) {
this.request.post.apply(null, arguments);
});
return aQueue.enqueue(requestPromise);
},
this.CreateRequest = function (pType, pUrl, pData) {
new Promise(function (resolve, reject) {
if(pType == this.Types.GET){
}else if(pType == this.Types.GET){
}else {
reject("The requested type is not ");
}
var headers = {
'Host': this.url,
'Cookie': this.GetCookieToRequest(),
'Content-Type': 'application/json',
'Content-Length': Buffer.byteLength(pData,'utf8')
};
var request = client.request(pType, pUrl, headers);
// listening to the response is optional, I suppose
request.on('response', function(response) {
response.on('data', function(chunk) {
// do what you do
});
response.on('end', function() {
// do what you do
});
});
});
}
this.GetCookieToRequest = function () {
return this.CooliesList.join(";");
}
this.AddCookie = function (cookie) {
this.CooliesList.push(cookie);
}
this.AddCookie_KeyValue = function (key, value) {
this.CooliesList.push(key + "=" + value);
}
}*/
2 changes: 1 addition & 1 deletion modules/queue.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
var safeMode = true;
var safeMode = true; // do only work, if running in Queue mode
module.exports = async function(steamClient, RequestCommunity, RequestStore, SessionID, options, callback){
var log = options.log;
var logError = options.logError;
Expand Down

0 comments on commit 7a754eb

Please sign in to comment.