test intercept setting
This commit is contained in:
parent
fdffad7532
commit
d2b0ab0da3
|
@ -29,7 +29,10 @@ func loadClients() error {
|
|||
|
||||
muxClients.Lock()
|
||||
for _, c := range clts {
|
||||
cx := ChirpClient{}
|
||||
cx := ChirpClient{
|
||||
Config: ChirpConfig{
|
||||
InterceptPillage: true,
|
||||
}}
|
||||
copier.Copy(&cx, &c)
|
||||
cx.Active = false
|
||||
/*
|
||||
|
@ -183,6 +186,9 @@ func getLockedClient(id int64, createMissing bool) (*ChirpClient, bool) {
|
|||
c := ChirpClient{
|
||||
TGUserID64: id,
|
||||
Active: false,
|
||||
Config: ChirpConfig{
|
||||
InterceptPillage: true,
|
||||
},
|
||||
}
|
||||
c.Mux.Lock()
|
||||
muxClients.RUnlock()
|
||||
|
|
5
def.go
5
def.go
|
@ -78,6 +78,10 @@ type MQClient struct {
|
|||
Queue amqp.Queue `json:"-"`
|
||||
}
|
||||
|
||||
type ChirpConfig struct {
|
||||
InterceptPillage bool `json:"intercept_pillage"`
|
||||
}
|
||||
|
||||
type ChirpClient struct {
|
||||
HeartBeat time.Time `json:"heart_beat"`
|
||||
Login string `json:"nickname"`
|
||||
|
@ -95,6 +99,7 @@ type ChirpClient struct {
|
|||
GameIdle bool `json:"game_idle"`
|
||||
BotIdle bool `json:"bot_idle"`
|
||||
Mux sync.Mutex `json:"-"`
|
||||
Config *ChirpConfig `json:"config"`
|
||||
}
|
||||
|
||||
type MQKeepAlive struct {
|
||||
|
|
Loading…
Reference in New Issue
Block a user