DoctorMcKay / node-globaloffensive

A Node.js module to connect to and interact with the CS2 game coordinator. Mostly used to get item data.
https://www.npmjs.com/package/globaloffensive
MIT License
262 stars 61 forks source link

Bug ? #24

Closed tabam1 closed 4 years ago

tabam1 commented 5 years ago

If i login account, and this account logout and disconnectedFromGC with reason 2 (NO_SESSION), steam-user login again this account, but i not get connectedToGC :/

tabam1 commented 5 years ago

Maybe i need after lost session new GlobalOffensive(user)

DoctorMcKay commented 5 years ago

I believe this is caused by the fact that Steam does not relay client disconnections to the GC, thus the GC doesn't even know that you were gone. So when you log back in again, the GC believes that you were always connected and thus it doesn't start a new session.

I don't know of a way to work around this beyond sending a message to the GC and seeing if it responds.

tabam1 commented 5 years ago

Maybe need to restart the game: client.gamesPlayed([730]); or run other game and later 730 eg. client.gamesPlayed([570]); setTimeout(function(){ client.gamesPlayed([730]); }, 5000);

DoctorMcKay commented 5 years ago

Restarting the game might work, though you don't need to run some other game first. Use client.gamesPlayed([]) to stop playing anything, then wait a few seconds and start 730 again.

Using client.gamesPlayed([730]) while you're already playing CS:GO will have no effect.