This commit is contained in:
shoopea 2020-02-29 17:25:58 +08:00
parent 2c707271ef
commit 38ba03b793

4
msg.go
View File

@ -100,6 +100,8 @@ func parseSubTypeMessageAlchStockAck(m *ChatWarsMessage, r *regexp.Regexp) (*Cha
cwm := ChatWarsMessageStockAnyAck{}
items := []ChatWarsItems{}
log.Printf("parseSubTypeMessageAlchStockAck : Start\n")
re := regexp.MustCompile(`\n\/aa_([0-9]{2}) ([a-zA-Z ']+) x (?[0-9]+)`)
for _, l := range re.FindAllStringSubmatch(r.ReplaceAllString(m.Text, "${Stuff}"), -1) {
log.Printf("parseSubTypeMessageAlchStockAck : %+q\n", l)
@ -115,6 +117,8 @@ func parseSubTypeMessageAlchStockAck(m *ChatWarsMessage, r *regexp.Regexp) (*Cha
}
}
log.Printf("parseSubTypeMessageAlchStockAck : Done\n")
cwm.Stock = items
cwm.Msg = m
return &cwm, nil