Skip to content

Commit

Permalink
Update appbot.js
Browse files Browse the repository at this point in the history
  • Loading branch information
SwayerPT authored Aug 26, 2017
1 parent a35520e commit 953de7e
Showing 1 changed file with 40 additions and 4 deletions.
44 changes: 40 additions & 4 deletions appbot.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,6 @@ client.on("loggedOn", function() {
client.setPersona(Steam.EPersonaState.Away);
log(`Logged on Steam Client as ${client.steamID.getSteam3RenderedID()}`);
client.gamesPlayed(forallArray(settings.games));
games(settings.games);


});

//===============//===============server process//
Expand All @@ -67,11 +64,50 @@ if (fs.existsSync('servers')) {

//

//===============//===============limitation process//

client.on('accountLimitations', function (limited, communityBanned) {
if (limited) {
if(settings.games.length < 5)
{
log("This Account is Limited.");
log("Initializing " + settings.games.length + " of 5 games...");

} else {

log("Exceeded the limit " + settings.games.length + " of 5 Games.");
log("Logging off...");
client.logOff();
shutdown();
}
}
else if(settings.games.length < 30)
{

log("Initializing " + settings.games.length + " of 30 games...");

} else {

log("Exceeded the limit " + settings.games.length + " of 30 Games.");
log("Logging off...");
client.logOff();
shutdown();
}

if (communityBanned){

log("Your account is Banned from Steam Community.");
log("Logging off...");
client.logOff();
shutdown();
}
});

//===============//===============friend process//
client.on('friendRelationship', (steamID, relationship) => {
if (relationship === 2 && settings.acceptRandomFriendRequests) {
client.addFriend(steamID);
log("You added a Friend " + steamID + " recently.");
log(`You added a new Friend ${client.steamID.getSteam3RenderedID()}`);
}
});

Expand Down

0 comments on commit 953de7e

Please sign in to comment.