summaryrefslogtreecommitdiffstats
path: root/bridge/steam/steam.go
diff options
context:
space:
mode:
authorWim <wim@42.be>2018-03-04 23:52:14 +0100
committerWim <wim@42.be>2018-03-04 23:52:14 +0100
commitf2f1d874e1b4f997c111de87121eec98eef66381 (patch)
tree34a44e866c053ef298d5482370208a0bb9dc4738 /bridge/steam/steam.go
parent25a72113b122f984c904b24c4af23a1cba1eff45 (diff)
downloadmatterbridge-msglm-f2f1d874e1b4f997c111de87121eec98eef66381.tar.gz
matterbridge-msglm-f2f1d874e1b4f997c111de87121eec98eef66381.tar.bz2
matterbridge-msglm-f2f1d874e1b4f997c111de87121eec98eef66381.zip
Use viper (github.com/spf13/viper) for configuration
Diffstat (limited to 'bridge/steam/steam.go')
-rw-r--r--bridge/steam/steam.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/bridge/steam/steam.go b/bridge/steam/steam.go
index a0bf757c..6065b2a8 100644
--- a/bridge/steam/steam.go
+++ b/bridge/steam/steam.go
@@ -18,11 +18,11 @@ type Bsteam struct {
connected chan struct{}
userMap map[steamid.SteamId]string
sync.RWMutex
- *config.BridgeConfig
+ *bridge.Config
}
-func New(cfg *config.BridgeConfig) bridge.Bridger {
- b := &Bsteam{BridgeConfig: cfg}
+func New(cfg *bridge.Config) bridge.Bridger {
+ b := &Bsteam{Config: cfg}
b.userMap = make(map[steamid.SteamId]string)
b.connected = make(chan struct{})
return b
@@ -81,9 +81,9 @@ func (b *Bsteam) getNick(id steamid.SteamId) string {
func (b *Bsteam) handleEvents() {
myLoginInfo := new(steam.LogOnDetails)
- myLoginInfo.Username = b.Config.Login
- myLoginInfo.Password = b.Config.Password
- myLoginInfo.AuthCode = b.Config.AuthCode
+ myLoginInfo.Username = b.GetString("Login")
+ myLoginInfo.Password = b.GetString("Password")
+ myLoginInfo.AuthCode = b.GetString("AuthCode")
// Attempt to read existing auth hash to avoid steam guard.
// Maybe works
//myLoginInfo.SentryFileHash, _ = ioutil.ReadFile("sentry")