update default value

This commit is contained in:
shoopea 2020-04-07 10:36:02 +08:00
parent 0c36738b0d
commit 950605b129

View File

@ -29,14 +29,12 @@ func loadClients() error {
muxClients.Lock()
for _, c := range clts {
cx := ChirpClient{
Config: &ChirpConfig{
InterceptPillage: true,
Wartime: `🛡Defend`,
},
}
cx := ChirpClient{}
copier.Copy(&cx, &c)
cx.Active = false
if cx.Config.Wartime == `` {
cx.Config.Wartime = `🛡Defend`
}
/*
cx.MQ.Connection, err = amqp.Dial("amqp://" + cx.MQ.User + ":" + cx.MQ.Password + "@" + cx.MQ.Host + "/" + cx.MQ.Path)
@ -191,6 +189,7 @@ func getLockedClient(id int64, createMissing bool) (*ChirpClient, bool) {
Active: false,
Config: &ChirpConfig{
InterceptPillage: true,
Wartime: `🛡Defend`,
},
}
c.Mux.Lock()