Comments (17)
That likely means the steam endpoint your attempting to connect to isn't up, or you can't route to it. Try switching to another steam endpoint.
from go-steam.
The current internal server list is pretty outdated, so you'll likely needs lots of tries before you can connect. After connecting, you can connect to one of the servers you get from the ClientCMListEvent
. Alternatively, you can use InitializeSteamDirectory
in the steam
package.
from go-steam.
@Philipp15b Isn't the list of servers now gathered from Steam API before connection by default? c24ff67 I thought that solved the problem of outdated server list.
from go-steam.
i think i try all servers from node.js servers.js
from go-steam.
Okay, i try to connect like that, someone told use InitializeSteamDirectory, i try use Connect to specified server, dont help. Or can someone send example how connect<3, or worked ip
package main
import (
"io/ioutil"
"log"
"github.com/Philipp15b/go-steam"
"github.com/Philipp15b/go-steam/protocol/steamlang"
)
func main() {
myLoginInfo := new(steam.LogOnDetails)
myLoginInfo.Username = "sa"
myLoginInfo.Password = "sa"
// if sentry, err := ioutil.ReadFile("sentry"); err == nil {
// myLoginInfo.SentryFileHash = sentry
//}
client := steam.NewClient()
err := steam.InitializeSteamDirectory()
if err != nil {
log.Panic(err.Error())
}
client.ConnectEurope()
for event := range client.Events() {
switch e := event.(type) {
case *steam.ConnectedEvent:
log.Println("Connecting SteamBot")
client.Auth.LogOn(myLoginInfo)
case *steam.MachineAuthUpdateEvent:
log.Println("Wrote Sentry")
ioutil.WriteFile("sentry", e.Hash, 0666)
case *steam.LoggedOnEvent:
log.Println("SteamBot logged in")
client.Social.SetPersonaState(steamlang.EPersonaState_Online)
case steam.FatalErrorEvent:
log.Println(e)
case error:
log.Println(e)
}
}
}
from go-steam.
oh no guys, my example worked, i forgot go build<3
from go-steam.
If you take a look at the client.go
file, only Connect()
method uses Steam Directory to get list of currently available servers. Use Connect()
instead of ConnectEurope()
.
Also if the account uses the Steam Guard, you will need to provide auth code from email or auth code from steam authenticator app.
from go-steam.
Slacki, i connected, but now dont work next state, he connect and thats all
from go-steam.
Could you provide more details? What do you mean by "next state"?
from go-steam.
Look at my main func
func main() {
myLoginInfo := new(steam.LogOnDetails)
myLoginInfo.Username = "st34nick"
myLoginInfo.Password = "434"
client := steam.NewClient()
steam.InitializeSteamDirectory()
client.Connect()
for event := range client.Events() {
switch e := event.(type) {
case *steam.ConnectedEvent:
log.Println("SteamBot connected to server")
client.Auth.LogOn(myLoginInfo)
log.Println("Trying to Auth")
case *steam.MachineAuthUpdateEvent:
log.Println("Use sentry")
ioutil.WriteFile("sentry", e.Hash, 0666)
case *steam.LoggedOnEvent:
log.Println("SteamBot succesfully auth")
client.Social.SetPersonaState(steamlang.EPersonaState_Online)
case steam.FatalErrorEvent:
log.Print(e)
case error:
log.Print(e)
}
}
}
In console
2016/01/18 18:06:43 SteamBot connected to server
2016/01/18 18:06:43 Trying to Auth
And thats all, then nothing help, i think i loose some event in auth
from go-steam.
I suggest you to add case for steam.LogOnFailedEvent
case *steam.LogOnFailedEvent:
log.Println(e)
Then you will be able to see what exactly failed during the authentication process.
from go-steam.
Ty man, i forgot about twoFactorAuth, okay now all good, thank you very, much, i will do example and post here for new ppl who use go-steam
from go-steam.
That would be appriciated a lot, I'm sure of that. ;)
from go-steam.
Slacki, okay, can u help, how can i send tradeoffer, i dont understand how i should create tradeoffer.Client
from go-steam.
Sorry mate, haven't tried that yet, cannot help you there.
from go-steam.
case *steam.WebSessionIdEvent:
client.Web.LogOn()
case *steam.WebLoggedOnEvent:
offerClient = tradeoffer.NewClient(tradeoffer.APIKey(botConfig.APIKey), client.Web.SessionId, client.Web.SteamLogin, client.Web.SteamLoginSecure)
from go-steam.
This should be fixed by a995980. The server list has been updated and the API is a bit more clear what connects to what and how.
from go-steam.
Related Issues (20)
- download CSGO demo HOT 3
- SteamKit 2.3.0 Full Release HOT 3
- Feature request: Auto-generate Steam Guard TOTP codes HOT 1
- Use in C ++ project?
- SteamAPI.Init == true - should it work?
- gs-bot returns connection failure on successful connection HOT 1
- Wrong module path in go.mod HOT 12
- Update generator for new protoc and protoc-gen-go HOT 1
- Steam Unified Messaging HOT 1
- Sentry file ignored — possible cause HOT 2
- proto: file "steammessages_base.proto" has a name conflict over CMsgProtoBufHeader HOT 3
- how to accept trade offer and confirm with MFA?
- Is there a sending gift example?
- Send message to group chat HOT 1
- client.Connect() timeout HOT 4
- Gamecordinator csgo send ECsgoGCMsg = 9156 but steam not respond anyhing HOT 1
- how can I disconnect correctly without a data race?
- Hello, can you update the new version of cookies for Steam? The current access token for encrypted Steam is universal
- Runtime Error on handleLogOnResponse HOT 2
- Connection timeout HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from go-steam.