test
This commit is contained in:
parent
291bea074a
commit
f878f9aab9
12
def.go
12
def.go
@ -416,6 +416,18 @@ type ChatWarsMessageShopMainReq struct {
|
|||||||
Link string `json:"link"`
|
Link string `json:"link"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type ChatWarsMessageGListAck struct {
|
||||||
|
Msg *ChatWarsMessage `json:"msg"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type ChatWarsMessageGDefListAck struct {
|
||||||
|
Msg *ChatWarsMessage `json:"msg"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type ChatWarsMessageGAtkListAck struct {
|
||||||
|
Msg *ChatWarsMessage `json:"msg"`
|
||||||
|
}
|
||||||
|
|
||||||
type ChatWarsMessageShopMainAck struct {
|
type ChatWarsMessageShopMainAck struct {
|
||||||
Msg *ChatWarsMessage `json:"msg"`
|
Msg *ChatWarsMessage `json:"msg"`
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
|
18
msg.go
18
msg.go
@ -467,6 +467,24 @@ func parseSubTypeMessageShopMainAck(m *ChatWarsMessage, r *regexp.Regexp) (*Chat
|
|||||||
return &cwm, nil
|
return &cwm, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func parseSubTypeMessageGListAck(m *ChatWarsMessage, r *regexp.Regexp) (*ChatWarsMessageGListAck, error) {
|
||||||
|
cwm := ChatWarsMessageGListAck{}
|
||||||
|
cwm.Msg = m
|
||||||
|
return &cwm, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func parseSubTypeMessageGDefListAck(m *ChatWarsMessage, r *regexp.Regexp) (*ChatWarsMessageGDefListAck, error) {
|
||||||
|
cwm := ChatWarsMessageGDefListAck{}
|
||||||
|
cwm.Msg = m
|
||||||
|
return &cwm, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func parseSubTypeMessageGAtkListAck(m *ChatWarsMessage, r *regexp.Regexp) (*ChatWarsMessageGAtkListAck, error) {
|
||||||
|
cwm := ChatWarsMessageGAtkListAck{}
|
||||||
|
cwm.Msg = m
|
||||||
|
return &cwm, nil
|
||||||
|
}
|
||||||
|
|
||||||
func parseSubTypeMessageMeAck(m *ChatWarsMessage, r *regexp.Regexp) (*ChatWarsMessageMeAck, error) {
|
func parseSubTypeMessageMeAck(m *ChatWarsMessage, r *regexp.Regexp) (*ChatWarsMessageMeAck, error) {
|
||||||
var (
|
var (
|
||||||
i int64
|
i int64
|
||||||
|
15
workers.go
15
workers.go
@ -559,6 +559,15 @@ func SQLIdentifyMsgWorker(id int, objIds <-chan int64) {
|
|||||||
logOnError(err, "SQLIdentifyMsgWorker["+strconv.Itoa(id)+"] : Parsing cacheObjSubType[`msg_shop_main_ack`]")
|
logOnError(err, "SQLIdentifyMsgWorker["+strconv.Itoa(id)+"] : Parsing cacheObjSubType[`msg_shop_main_ack`]")
|
||||||
err = insertMsgShopMainAck(cwm)
|
err = insertMsgShopMainAck(cwm)
|
||||||
logOnError(err, "SQLIdentifyMsgWorker["+strconv.Itoa(id)+"] : insertMsgShopMainAck")
|
logOnError(err, "SQLIdentifyMsgWorker["+strconv.Itoa(id)+"] : insertMsgShopMainAck")
|
||||||
|
case cacheObjSubType[`msg_g_list_req`]:
|
||||||
|
case cacheObjSubType[`msg_g_list_ack`]:
|
||||||
|
_, err := parseSubTypeMessageGListAck(m, rule.re)
|
||||||
|
case cacheObjSubType[`msg_g_atklist_req`]:
|
||||||
|
case cacheObjSubType[`msg_g_atklist_ack`]:
|
||||||
|
_, err := parseSubTypeMessageGAtkListAck(m, rule.re)
|
||||||
|
case cacheObjSubType[`msg_g_deflist_req`]:
|
||||||
|
case cacheObjSubType[`msg_g_deflist_ack`]:
|
||||||
|
_, err := parseSubTypeMessageGDefListAck(m, rule.re)
|
||||||
case cacheObjSubType[`msg_bot_user_config`]:
|
case cacheObjSubType[`msg_bot_user_config`]:
|
||||||
botUserConfig(m)
|
botUserConfig(m)
|
||||||
case cacheObjSubType[`msg_bot_user_config_pillage_on`]:
|
case cacheObjSubType[`msg_bot_user_config_pillage_on`]:
|
||||||
@ -590,12 +599,6 @@ func SQLIdentifyMsgWorker(id int, objIds <-chan int64) {
|
|||||||
botVaultValOth(m)
|
botVaultValOth(m)
|
||||||
case cacheObjSubType[`msg_refresh_cmd`]:
|
case cacheObjSubType[`msg_refresh_cmd`]:
|
||||||
botRefreshMsg(m, rule.re)
|
botRefreshMsg(m, rule.re)
|
||||||
case cacheObjSubType[`msg_g_list_req`]:
|
|
||||||
case cacheObjSubType[`msg_g_list_ack`]:
|
|
||||||
case cacheObjSubType[`msg_g_atklist_req`]:
|
|
||||||
case cacheObjSubType[`msg_g_atklist_ack`]:
|
|
||||||
case cacheObjSubType[`msg_g_deflist_req`]:
|
|
||||||
case cacheObjSubType[`msg_g_deflist_ack`]:
|
|
||||||
default:
|
default:
|
||||||
//log.Printf("SQLIdentifyMsgWorker["+strconv.Itoa(id)+"] : Unknwon message type in rule %d : %d (%d)\n%s\n", msgParsingRules[i].ID, msgParsingRules[i].MsgTypeID64, objId, m.Text)
|
//log.Printf("SQLIdentifyMsgWorker["+strconv.Itoa(id)+"] : Unknwon message type in rule %d : %d (%d)\n%s\n", msgParsingRules[i].ID, msgParsingRules[i].MsgTypeID64, objId, m.Text)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user