This commit is contained in:
shoopea 2019-06-02 17:45:13 +08:00
parent 33c01fa77e
commit 419195897f

2
msg.go
View File

@ -35,7 +35,7 @@ func parseSubTypeMessageGStockAnyAck(m *ChatWarsMessage, r *regexp.Regexp) (*Cha
log.Printf("parseSubTypeMessageGStockAnyAck : GStock Any Ack identified\n") log.Printf("parseSubTypeMessageGStockAnyAck : GStock Any Ack identified\n")
// log.Printf("parseSubTypeMessageGStockAnyAck : Stock : %s\n", r.ReplaceAllString(m.Text, "${Stock}")) // log.Printf("parseSubTypeMessageGStockAnyAck : Stock : %s\n", r.ReplaceAllString(m.Text, "${Stock}"))
re := regexp.MustCompile(`(\n[0-9a-z]+ .* x [0-9]+)`) re := regexp.MustCompile(`(\n[0-9a-z]+ .* x [0-9]+)`)
for s := range re.FindAllString(r.ReplaceAllString(m.Text, "${Stock}"), -1) { for _, s := range re.FindAllString(r.ReplaceAllString(m.Text, "${Stock}"), -1) {
log.Printf("parseSubTypeMessageGStockAnyAck : %s\n", s) log.Printf("parseSubTypeMessageGStockAnyAck : %s\n", s)
} }
return &cwm, nil return &cwm, nil