Giter VIP home page Giter VIP logo

Comments (17)

b1naryth1ef avatar b1naryth1ef commented on August 16, 2024

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.

Philipp15b avatar Philipp15b commented on August 16, 2024

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.

slacki avatar slacki commented on August 16, 2024

@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.

StringNick avatar StringNick commented on August 16, 2024

i think i try all servers from node.js servers.js

from go-steam.

StringNick avatar StringNick commented on August 16, 2024

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.

StringNick avatar StringNick commented on August 16, 2024

oh no guys, my example worked, i forgot go build<3

from go-steam.

slacki avatar slacki commented on August 16, 2024

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.

StringNick avatar StringNick commented on August 16, 2024

Slacki, i connected, but now dont work next state, he connect and thats all

from go-steam.

slacki avatar slacki commented on August 16, 2024

Could you provide more details? What do you mean by "next state"?

from go-steam.

StringNick avatar StringNick commented on August 16, 2024

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.

slacki avatar slacki commented on August 16, 2024

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.

StringNick avatar StringNick commented on August 16, 2024

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.

slacki avatar slacki commented on August 16, 2024

That would be appriciated a lot, I'm sure of that. ;)

from go-steam.

StringNick avatar StringNick commented on August 16, 2024

Slacki, okay, can u help, how can i send tradeoffer, i dont understand how i should create tradeoffer.Client

from go-steam.

slacki avatar slacki commented on August 16, 2024

Sorry mate, haven't tried that yet, cannot help you there.

from go-steam.

YellowOrWhite avatar YellowOrWhite commented on August 16, 2024
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.

Philipp15b avatar Philipp15b commented on August 16, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.