moved authcode from a flag to config

This commit is contained in:
2021-10-27 01:42:27 +02:00
parent 0b6d31968c
commit 20f95589db
3 changed files with 3 additions and 2 deletions

View File

@@ -12,6 +12,7 @@ steam:
username: steamuser
# Password needs to be provided only until a login_key is obtained, can be empty after
password: steampassword
auth_code:
api_key: apikey
rate_per_sec: 1
sentry: ".sentry"

View File

@@ -42,7 +42,6 @@ var (
firstHK = true
rL ratelimit.Limiter
configFlag = flag.String("config", "config.yaml", "Set config to use")
authCodeFlag = flag.String("authcode", "", "Provide Steam AuthCode to login")
journalLogFlag = flag.Bool("journal", false, "Log to systemd journal instead of stdout")
sqlDebugFlag = flag.Bool("sqldebug", false, "Debug SQL queries")
)
@@ -825,7 +824,7 @@ func main() {
err = demoLoader.Setup(&csgo.DemoMatchLoaderConfig{
Username: conf.Steam.Username,
Password: conf.Steam.Password,
AuthCode: *authCodeFlag,
AuthCode: conf.Steam.AuthCode,
Sentry: conf.Steam.Sentry,
LoginKey: conf.Steam.LoginKey,
ServerList: conf.Steam.ServerList,

View File

@@ -39,6 +39,7 @@ type Conf struct {
Steam struct {
Username string
Password string
AuthCode string `yaml:"auth_code"`
APIKey string `yaml:"api_key"`
RatePerSecond int `yaml:"rate_per_sec"`
Sentry string