diff --git a/workers.go b/workers.go index 34d9ab9..1852580 100644 --- a/workers.go +++ b/workers.go @@ -3,6 +3,7 @@ package main import ( "encoding/json" "log" + "regexp" "strconv" "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) // War reports r := regexp.MustCompile(`^(?P[.]{1})(?P(\[[A-Z]{3}\]){0,1})(?P(\[[A-Za-z0-9 ]*\]){1}) ⚔:(?P[0-9]+) ?:(?P[0-9]+) Lvl: (?P[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) } }