diff --git a/workers.go b/workers.go index 41b7491..dc45286 100644 --- a/workers.go +++ b/workers.go @@ -169,17 +169,23 @@ func SQLIdentifyMsgWorker(id int, objIds <-chan int64) { } cwm.Report[r.ReplaceAllString(m.Text, "${Loot7}")] = rep //b, err := json.Marshal(cwm) - if (len(r.ReplaceAllString(m.Text, "${Loot1}")) < 6 || len(r.ReplaceAllString(m.Text, "${Loot1}")) > 11) || - (len(r.ReplaceAllString(m.Text, "${Loot2}")) < 6 || len(r.ReplaceAllString(m.Text, "${Loot2}")) > 11) { - log.Printf("SQLIdentifyMsgWorker["+strconv.Itoa(id)+"] : NOT MATCHED \nLoot1: %s\nLoot2: %s\n%s\n", r.ReplaceAllString(m.Text, "${Loot1}"), r.ReplaceAllString(m.Text, "${Loot2}"), m.Text) + if len(r.ReplaceAllString(m.Text, "${Loot1}")) < 6 || len(r.ReplaceAllString(m.Text, "${Loot1}")) > 11 { + log.Printf("SQLIdentifyMsgWorker["+strconv.Itoa(id)+"] : NOT MATCHED \nLoot1: %s\n%s\n", r.ReplaceAllString(m.Text, "${Loot1}"), m.Text) } else { - log.Printf("SQLIdentifyMsgWorker["+strconv.Itoa(id)+"] : MATCHED!\nLoot1: %s\nLoot2: %s\n%s\n", r.ReplaceAllString(m.Text, "${Loot1}"), r.ReplaceAllString(m.Text, "${Loot2}"), m.Text) - //log.Printf("SQLIdentifyMsgWorker["+strconv.Itoa(id)+"] : objSubTypeMessageMiniWar\n%s\n", string(b)) + log.Printf("SQLIdentifyMsgWorker["+strconv.Itoa(id)+"] : MATCHED!\nLoot1: %s\n%s\n", r.ReplaceAllString(m.Text, "${Loot1}"), m.Text) } /* - if err == nil { - log.Printf("SQLIdentifyMsgWorker["+strconv.Itoa(id)+"] : War time : %s (%d)\n", r.ReplaceAllString(m.Text, "${Time}"), objId) + if (len(r.ReplaceAllString(m.Text, "${Loot1}")) < 6 || len(r.ReplaceAllString(m.Text, "${Loot1}")) > 11) || + (len(r.ReplaceAllString(m.Text, "${Loot2}")) < 6 || len(r.ReplaceAllString(m.Text, "${Loot2}")) > 11) { + log.Printf("SQLIdentifyMsgWorker["+strconv.Itoa(id)+"] : NOT MATCHED \nLoot1: %s\nLoot2: %s\n%s\n", r.ReplaceAllString(m.Text, "${Loot1}"), r.ReplaceAllString(m.Text, "${Loot2}"), m.Text) + } else { + log.Printf("SQLIdentifyMsgWorker["+strconv.Itoa(id)+"] : MATCHED!\nLoot1: %s\nLoot2: %s\n%s\n", r.ReplaceAllString(m.Text, "${Loot1}"), r.ReplaceAllString(m.Text, "${Loot2}"), m.Text) + //log.Printf("SQLIdentifyMsgWorker["+strconv.Itoa(id)+"] : objSubTypeMessageMiniWar\n%s\n", string(b)) } + /* + if err == nil { + log.Printf("SQLIdentifyMsgWorker["+strconv.Itoa(id)+"] : War time : %s (%d)\n", r.ReplaceAllString(m.Text, "${Time}"), objId) + } */ case objSubTypeMessageAuctionAnnounce: