update default values for client config
This commit is contained in:
parent
b083cdd9cd
commit
01ab600410
19
client.go
19
client.go
@ -29,22 +29,15 @@ func loadClients() error {
|
||||
|
||||
muxClients.Lock()
|
||||
for _, c := range clts {
|
||||
cx := ChirpClient{}
|
||||
copier.Copy(&cx, &c)
|
||||
cx.Active = false
|
||||
if cx.Config == nil {
|
||||
cx.Config = &ChirpConfig{
|
||||
cx := ChirpClient{
|
||||
ChirpConfig{
|
||||
InterceptPillage: true,
|
||||
Wartime: `🛡Defend`,
|
||||
},
|
||||
}
|
||||
} else {
|
||||
if cx.Config.InterceptPillage == nil {
|
||||
cx.Config.InterceptPillage = true
|
||||
}
|
||||
if len(cx.Config.Wartime) == 0 {
|
||||
cx.Config.Wartime = `🛡Defend`
|
||||
}
|
||||
}
|
||||
copier.Copy(&cx, &c)
|
||||
cx.Active = false
|
||||
|
||||
/*
|
||||
cx.MQ.Connection, err = amqp.Dial("amqp://" + cx.MQ.User + ":" + cx.MQ.Password + "@" + cx.MQ.Host + "/" + cx.MQ.Path)
|
||||
logOnError(err, "loadClients : Failed to connect to RabbitMQ")
|
||||
|
Loading…
Reference in New Issue
Block a user