fix
This commit is contained in:
parent
bd215b8e47
commit
079de7e514
@ -3,6 +3,7 @@ package main
|
|||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"log"
|
"log"
|
||||||
|
"regexp"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
|
||||||
"github.com/streadway/amqp"
|
"github.com/streadway/amqp"
|
||||||
@ -77,7 +78,7 @@ func SQLIdentifyMsgWorker(id int, objIds <-chan int64) {
|
|||||||
log.Printf("SQLIdentifyMsgWorker["+strconv.Itoa(id)+"] : Message retrieved (%d)\n%s\n", objId, m.Text)
|
log.Printf("SQLIdentifyMsgWorker["+strconv.Itoa(id)+"] : Message retrieved (%d)\n%s\n", objId, m.Text)
|
||||||
// War reports
|
// War reports
|
||||||
r := regexp.MustCompile(`^(?P<Castle>[.]{1})(?P<Guild>(\[[A-Z]{3}\]){0,1})(?P<User>(\[[A-Za-z0-9 ]*\]){1}) ⚔:(?P<Attack>[0-9]+) ?:(?P<Defense>[0-9]+) Lvl: (?P<Level>[0-9]+)(?s:.*)$`)
|
r := regexp.MustCompile(`^(?P<Castle>[.]{1})(?P<Guild>(\[[A-Z]{3}\]){0,1})(?P<User>(\[[A-Za-z0-9 ]*\]){1}) ⚔:(?P<Attack>[0-9]+) ?:(?P<Defense>[0-9]+) Lvl: (?P<Level>[0-9]+)(?s:.*)$`)
|
||||||
if r.FindStringSubmatch(item) != nil {
|
if r.FindStringSubmatch(m.Text) != nil {
|
||||||
log.Printf("SQLIdentifyMsgWorker["+strconv.Itoa(id)+"] : War report identified (%d)\n", objId)
|
log.Printf("SQLIdentifyMsgWorker["+strconv.Itoa(id)+"] : War report identified (%d)\n", objId)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user