forked from chteufleur/go-xmpp4steam
Save Steam servers address only if it can be json mashal
This commit is contained in:
parent
24f1a6d7a2
commit
7b2e4df008
2
main.go
2
main.go
|
|
@ -15,7 +15,7 @@ import (
|
|||
)
|
||||
|
||||
const (
|
||||
Version = "go-xmpp4steam v0.2.0"
|
||||
Version = "go-xmpp4steam v0.2.1"
|
||||
configurationFilePath = "xmpp4steam.cfg"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -85,8 +85,9 @@ func mainSteam() {
|
|||
b, err := json.Marshal(*e)
|
||||
if err != nil {
|
||||
log.Printf("%sFailed to json.Marshal() servers list", LogError)
|
||||
}
|
||||
} else {
|
||||
ioutil.WriteFile(serverAddrs, b, 0666)
|
||||
}
|
||||
|
||||
case *steam.PersonaStateEvent:
|
||||
ChanPresence <- e.FriendId.ToString()
|
||||
|
|
|
|||
Loading…
Reference in New Issue