Jump to content


Photo

Web logon interval


Best Answer Dr. McKay , 03 October 2019 - 06:40 AM

Using setInterval will make it automatically call webLogOn every 30 minutes (with your configuration). If you call setInterval more than once, it will call webLogOn more than once every 30 minutes.

Go to the full post


  • Please log in to reply
5 replies to this topic

#1 sNIP

sNIP

    Member

  • Member
  • PipPip
  • 18 posts

Posted 02 October 2019 - 04:02 AM

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



#2 Dr. McKay

Dr. McKay

    Developer

  • Administrator
  • 2,212 posts

Posted 02 October 2019 - 05:02 AM

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.



#3 sNIP

sNIP

    Member

  • Member
  • PipPip
  • 18 posts

Posted 02 October 2019 - 06:03 AM

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
 
});


#4 Dr. McKay

Dr. McKay

    Developer

  • Administrator
  • 2,212 posts

Posted 02 October 2019 - 05:47 PM

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.



#5 sNIP

sNIP

    Member

  • Member
  • PipPip
  • 18 posts

Posted 03 October 2019 - 03:57 AM

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



#6 Dr. McKay

Dr. McKay

    Developer

  • Administrator
  • 2,212 posts

Posted 03 October 2019 - 06:40 AM   Best Answer

Using setInterval will make it automatically call webLogOn every 30 minutes (with your configuration). If you call setInterval more than once, it will call webLogOn more than once every 30 minutes.






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users