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"`
|
||||
}
|
||||
|
||||
type ChatWarsMessageGListAck struct {
|
||||
Msg *ChatWarsMessage `json:"msg"`
|
||||
}
|
||||
|
||||
type ChatWarsMessageGDefListAck struct {
|
||||
Msg *ChatWarsMessage `json:"msg"`
|
||||
}
|
||||
|
||||
type ChatWarsMessageGAtkListAck struct {
|
||||
Msg *ChatWarsMessage `json:"msg"`
|
||||
}
|
||||
|
||||
type ChatWarsMessageShopMainAck struct {
|
||||
Msg *ChatWarsMessage `json:"msg"`
|
||||
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
|
||||
}
|
||||
|
||||
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) {
|
||||
var (
|
||||
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`]")
|
||||
err = insertMsgShopMainAck(cwm)
|
||||
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`]:
|
||||
botUserConfig(m)
|
||||
case cacheObjSubType[`msg_bot_user_config_pillage_on`]:
|
||||
@ -590,12 +599,6 @@ func SQLIdentifyMsgWorker(id int, objIds <-chan int64) {
|
||||
botVaultValOth(m)
|
||||
case cacheObjSubType[`msg_refresh_cmd`]:
|
||||
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:
|
||||
//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