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() muxClients.Lock()
for _, c := range clts { for _, c := range clts {
cx := ChirpClient{ cx := ChirpClient{}
Config: &ChirpConfig{
InterceptPillage: true,
Wartime: `🛡Defend`,
},
}
copier.Copy(&cx, &c) copier.Copy(&cx, &c)
cx.Active = false 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) 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, Active: false,
Config: &ChirpConfig{ Config: &ChirpConfig{
InterceptPillage: true, InterceptPillage: true,
Wartime: `🛡Defend`,
}, },
} }
c.Mux.Lock() c.Mux.Lock()