moved authcode from a flag to config
This commit is contained in:
@@ -12,6 +12,7 @@ steam:
|
|||||||
username: steamuser
|
username: steamuser
|
||||||
# Password needs to be provided only until a login_key is obtained, can be empty after
|
# Password needs to be provided only until a login_key is obtained, can be empty after
|
||||||
password: steampassword
|
password: steampassword
|
||||||
|
auth_code:
|
||||||
api_key: apikey
|
api_key: apikey
|
||||||
rate_per_sec: 1
|
rate_per_sec: 1
|
||||||
sentry: ".sentry"
|
sentry: ".sentry"
|
||||||
|
3
main.go
3
main.go
@@ -42,7 +42,6 @@ var (
|
|||||||
firstHK = true
|
firstHK = true
|
||||||
rL ratelimit.Limiter
|
rL ratelimit.Limiter
|
||||||
configFlag = flag.String("config", "config.yaml", "Set config to use")
|
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")
|
journalLogFlag = flag.Bool("journal", false, "Log to systemd journal instead of stdout")
|
||||||
sqlDebugFlag = flag.Bool("sqldebug", false, "Debug SQL queries")
|
sqlDebugFlag = flag.Bool("sqldebug", false, "Debug SQL queries")
|
||||||
)
|
)
|
||||||
@@ -825,7 +824,7 @@ func main() {
|
|||||||
err = demoLoader.Setup(&csgo.DemoMatchLoaderConfig{
|
err = demoLoader.Setup(&csgo.DemoMatchLoaderConfig{
|
||||||
Username: conf.Steam.Username,
|
Username: conf.Steam.Username,
|
||||||
Password: conf.Steam.Password,
|
Password: conf.Steam.Password,
|
||||||
AuthCode: *authCodeFlag,
|
AuthCode: conf.Steam.AuthCode,
|
||||||
Sentry: conf.Steam.Sentry,
|
Sentry: conf.Steam.Sentry,
|
||||||
LoginKey: conf.Steam.LoginKey,
|
LoginKey: conf.Steam.LoginKey,
|
||||||
ServerList: conf.Steam.ServerList,
|
ServerList: conf.Steam.ServerList,
|
||||||
|
@@ -39,6 +39,7 @@ type Conf struct {
|
|||||||
Steam struct {
|
Steam struct {
|
||||||
Username string
|
Username string
|
||||||
Password string
|
Password string
|
||||||
|
AuthCode string `yaml:"auth_code"`
|
||||||
APIKey string `yaml:"api_key"`
|
APIKey string `yaml:"api_key"`
|
||||||
RatePerSecond int `yaml:"rate_per_sec"`
|
RatePerSecond int `yaml:"rate_per_sec"`
|
||||||
Sentry string
|
Sentry string
|
||||||
|
Reference in New Issue
Block a user