Jump to content
McKay Development
sNIP

Web logon interval

Recommended Posts

I kept getting 403 from my VPS server, I tried testing 5 bots yesterday, everything was fine, but since I woke up on the next day, I kept getting 403 on both community and steam store, but the bot logs in fine.

 

client.on("webSession", (sidcookies=> {
    manager.setCookies(cookies);
    community.setCookies(cookies);

    // this is for keeping the bot in the steam network:
    setTimeout(function(){
        setInterval(function () {
            client.webLogOn();
        }, pollRate.webLogOn);
    },pollRate.webLogOn)
});

pollRate.webLogOn is 1000 * 60 * 5

I honestly do not know what is happening, since this is the third time I got permanently 403'ed on ip. I do not do anything malicious, I do not add friends, I do not send offers, I just tried to chat with the bots.

Really looking forward for some help

Share this post


Link to post
Share on other sites

Every time you get a new web session, you're starting a new interval to call client.webLogOn(). So after a half hour, your web logon rate has elapsed 6 times and now you're calling client.webLogOn() 6 times every 30 minutes.

I wanted to log-in every 5 minutes, is this a problem? Should I move : 

setTimeout(function(){
        setInterval(function () {
            client.webLogOn();
        }, pollRate.webLogOn);
    },pollRate.webLogOn)

out of:

client.on("webSession", (sidcookies=> {
    manager.setCookies(cookies);
    community.setCookies(cookies);
    // This is where the setInterval Was
 
});

Share this post


Link to post
Share on other sites

Yes, you should put that outside of any callback. It should only ever be called once.

 

Also, there's no use in nesting it inside a setTimeout.

Sure? I though that if I need to use steam-community I  need to constantly login in in order to not receive "Not logged" in error

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...