1
0
Fork 0

Save Steam servers address only if it can be json mashal

This commit is contained in:
Chteufleur 2016-04-12 13:57:34 +02:00
parent 24f1a6d7a2
commit 7b2e4df008
2 changed files with 3 additions and 2 deletions

View File

@ -15,7 +15,7 @@ import (
)
const (
Version = "go-xmpp4steam v0.2.0"
Version = "go-xmpp4steam v0.2.1"
configurationFilePath = "xmpp4steam.cfg"
)

View File

@ -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()