This commit is contained in:
shoopea 2019-06-02 17:33:17 +08:00
parent 835afa709f
commit 3c65b9492a
2 changed files with 1 additions and 2 deletions

2
msg.go
View File

@ -33,7 +33,7 @@ func parseSubTypeMessageReportAck(m *ChatWarsMessage, r *regexp.Regexp) (*ChatWa
func parseSubTypeMessageGStockAnyAck(m *ChatWarsMessage, r *regexp.Regexp) (*ChatWarsMessageStock, error) { func parseSubTypeMessageGStockAnyAck(m *ChatWarsMessage, r *regexp.Regexp) (*ChatWarsMessageStock, error) {
cwm := ChatWarsMessageStock{} cwm := ChatWarsMessageStock{}
log.Printf("parseSubTypeMessageReport : GStock Any Ack identified\n") log.Printf("parseSubTypeMessageReport : GStock Any Ack identified\n")
re := regex.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)
} }

View File

@ -122,7 +122,6 @@ func SQLIdentifyMsgWorker(id int, objIds <-chan int64) {
case objSubTypeMessageGStockAnyAck: case objSubTypeMessageGStockAnyAck:
cwm, err := parseSubTypeMessageGStockAnyAck(m, r) cwm, err := parseSubTypeMessageGStockAnyAck(m, r)
logOnError(err, "SQLIdentifyMsgWorker["+strconv.Itoa(id)+"] : Parsing objSubTypeMessageGStockAnyAck.") logOnError(err, "SQLIdentifyMsgWorker["+strconv.Itoa(id)+"] : Parsing objSubTypeMessageGStockAnyAck.")
cwm.ObjID64 = objId
case objSubTypeMessageReportAck: case objSubTypeMessageReportAck:
cwm, err := parseSubTypeMessageReportAck(m, r) cwm, err := parseSubTypeMessageReportAck(m, r)
logOnError(err, "SQLIdentifyMsgWorker["+strconv.Itoa(id)+"] : Parsing objSubTypeMessageReportAck.") logOnError(err, "SQLIdentifyMsgWorker["+strconv.Itoa(id)+"] : Parsing objSubTypeMessageReportAck.")