test
This commit is contained in:
parent
db95640467
commit
a3961fcab6
1
sql.go
1
sql.go
@ -1275,6 +1275,7 @@ func resetMsgParsingRules() {
|
|||||||
`Battle (?P<Time>[0-9]{2}/[0-9]{2}/[0-9]{2} [0-9]{2}:[0-9]{2})$")*/`
|
`Battle (?P<Time>[0-9]{2}/[0-9]{2}/[0-9]{2} [0-9]{2}:[0-9]{2})$")*/`
|
||||||
,(4000, ` + strconv.Itoa(objSubTypeMessageMiniWar) + `, "Mini War", "^⛳️Battle results:\\n` +
|
,(4000, ` + strconv.Itoa(objSubTypeMessageMiniWar) + `, "Mini War", "^⛳️Battle results:\\n` +
|
||||||
`(?P<Gardian1>🔱){0,1}.*(?P<Loot1>(Moonlight|Wolfpack|Deerhorn|Dragonscale|Sharkteeth|Potato|Highnest)):.*\\n` +
|
`(?P<Gardian1>🔱){0,1}.*(?P<Loot1>(Moonlight|Wolfpack|Deerhorn|Dragonscale|Sharkteeth|Potato|Highnest)):.*\\n` +
|
||||||
|
`(?P<Gardian2>🔱){0,1}.*(?P<Loot2>(Moonlight|Wolfpack|Deerhorn|Dragonscale|Sharkteeth|Potato|Highnest)):.*\\n` +
|
||||||
`(?s:.*)` +
|
`(?s:.*)` +
|
||||||
`Battle (?P<Time>[0-9]{2}/[0-9]{2}/[0-9]{2} [0-9]{2}:[0-9]{2})$")
|
`Battle (?P<Time>[0-9]{2}/[0-9]{2}/[0-9]{2} [0-9]{2}:[0-9]{2})$")
|
||||||
;`)
|
;`)
|
||||||
|
11
workers.go
11
workers.go
@ -169,19 +169,18 @@ func SQLIdentifyMsgWorker(id int, objIds <-chan int64) {
|
|||||||
}
|
}
|
||||||
cwm.Report[r.ReplaceAllString(m.Text, "${Loot7}")] = rep
|
cwm.Report[r.ReplaceAllString(m.Text, "${Loot7}")] = rep
|
||||||
//b, err := json.Marshal(cwm)
|
//b, err := json.Marshal(cwm)
|
||||||
|
/*
|
||||||
if len(r.ReplaceAllString(m.Text, "${Loot1}")) < 6 || len(r.ReplaceAllString(m.Text, "${Loot1}")) > 11 {
|
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)
|
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\n%s\n", r.ReplaceAllString(m.Text, "${Loot1}"), m.Text)
|
|
||||||
}
|
}
|
||||||
/*
|
*/
|
||||||
|
//log.Printf("SQLIdentifyMsgWorker["+strconv.Itoa(id)+"] : MATCHED!\nLoot1: %s\n%s\n", r.ReplaceAllString(m.Text, "${Loot1}"), m.Text)
|
||||||
if (len(r.ReplaceAllString(m.Text, "${Loot1}")) < 6 || len(r.ReplaceAllString(m.Text, "${Loot1}")) > 11) ||
|
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) {
|
(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)
|
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))
|
|
||||||
}
|
}
|
||||||
|
//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 {
|
if err == nil {
|
||||||
log.Printf("SQLIdentifyMsgWorker["+strconv.Itoa(id)+"] : War time : %s (%d)\n", r.ReplaceAllString(m.Text, "${Time}"), objId)
|
log.Printf("SQLIdentifyMsgWorker["+strconv.Itoa(id)+"] : War time : %s (%d)\n", r.ReplaceAllString(m.Text, "${Time}"), objId)
|
||||||
|
Loading…
Reference in New Issue
Block a user