test
This commit is contained in:
parent
9ed2c2c081
commit
afdf512fc6
@ -71,6 +71,7 @@ func SQLCWMsgWorker(id int, msgs <-chan ChatWarsMessage, objIds chan<- int64) {
|
||||
}
|
||||
|
||||
func SQLIdentifyMsgWorker(id int, objIds <-chan int64) {
|
||||
var i int
|
||||
log.Printf("SQLIdentifyMsgWorker[" + strconv.Itoa(id) + "] : Starting.")
|
||||
for objId := range objIds {
|
||||
m, err := getMsg(objId)
|
||||
@ -79,7 +80,7 @@ func SQLIdentifyMsgWorker(id int, objIds <-chan int64) {
|
||||
log.Printf("SQLIdentifyMsgWorker["+strconv.Itoa(id)+"] : Message retrieved (%d)\n%s\n", objId, m.Text)
|
||||
// War reports
|
||||
// r := regexp.MustCompile(`^(?P<Castle>.)(?P<Guild>(\[[A-Z]{3}\]){0,1})(?P<User>([A-Za-z0-9 ]*)) ⚔:(?P<Attack>[0-9]+) .:(?P<Defense>[0-9]+) Lvl: (?P<Level>[0-9]+)\nYour result on the battlefield:\n.Exp: (?P<Exp>[0-9]+)\n.Gold: (?P<Gold>[0-9]+)\n.Stock: (?P<Stock>[0-9]+)\n(?s:.*)$`) // FIXME defense/exp/gold/stock characters !
|
||||
for i := 0; i < len(msgParsingRules) && msgParsingRules[i].re.FindStringSubmatch(m.Text) != nil; i++ {
|
||||
for i = 0; i < len(msgParsingRules) && msgParsingRules[i].re.FindStringSubmatch(m.Text) != nil; i++ {
|
||||
|
||||
}
|
||||
if i == len(msgParsingRules) {
|
||||
|
Loading…
Reference in New Issue
Block a user