test
This commit is contained in:
parent
a183d605a8
commit
b91ed6f98a
@ -78,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<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 !
|
||||
r := regexp.MustCompile(`^(?P<Castle>[🐉🦅🐺🦈🦌🥔🌑])(?P<Guild>(\[[A-Z]{3}\]){0,1})(?P<User>([A-Za-z0-9 ]*)) ⚔:(?P<Attack>[0-9]+)(?P<AttackMod>\((-|+)[0-9]+\)){0,1} 🛡:(?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,1}[0-9]+)\n📦Stock: (?P<Stock>-{0,1}[0-9]+)\n\n(?P<Stamina>(🔋Stamina restored)){0,1}(\n)*(?P<Crit>(⚡Critical strike)){0,1}(\n)*(?s:.*)$`)
|
||||
r := regexp.MustCompile(`^(?P<Castle>[🐉🦅🐺🦈🦌🥔🌑])(?P<Guild>(\[[A-Z]{3}\]){0,1})(?P<User>([A-Za-z0-9 ]*)) ⚔:(?P<Attack>[0-9]+)(?P<AttackMod>\((-|\+)[0-9]+\)){0,1} 🛡:(?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,1}[0-9]+)\n📦Stock: (?P<Stock>-{0,1}[0-9]+)\n\n(?P<Stamina>(🔋Stamina restored)){0,1}(\n)*(?P<Crit>(⚡Critical strike)){0,1}(\n)*(?s:.*)$`)
|
||||
if r.FindStringSubmatch(m.Text) != nil {
|
||||
log.Printf("SQLIdentifyMsgWorker["+strconv.Itoa(id)+"] : War report identified (%d)\n", objId)
|
||||
log.Printf("SQLIdentifyMsgWorker["+strconv.Itoa(id)+"] : Castle : %s (%d)\n", r.ReplaceAllString(m.Text, "${Castle}"), objId)
|
||||
|
Loading…
Reference in New Issue
Block a user