added config option for password

This commit is contained in:
2021-10-05 19:45:57 +02:00
parent 618a23627d
commit 1e9c653c7d
4 changed files with 7 additions and 4 deletions

View File

@@ -127,12 +127,12 @@ func (d *DemoMatchLoader) connectToSteam() error {
return nil
}
func (d *DemoMatchLoader) Setup(username string, authCode string) error {
func (d *DemoMatchLoader) Setup(username string, password string, authCode string) error {
d.steamLogin = new(steam.LogOnDetails)
d.steamLogin.Username = username
d.steamLogin.Password = os.Getenv("STEAM_PASSWORD")
d.steamLogin.ShouldRememberPassword = true
d.steamLogin.Password = password
d.steamLogin.AuthCode = authCode
d.steamLogin.ShouldRememberPassword = true
if _, err := os.Stat(SENTRYFILE); err == nil {
hash, err := ioutil.ReadFile(SENTRYFILE)