diff --git a/data/msg_rules.json b/data/msg_rules.json index 5842175..2741511 100644 --- a/data/msg_rules.json +++ b/data/msg_rules.json @@ -1874,7 +1874,7 @@ { "prio": 5000, "descn": "Tributes stats ack", - "rule": "^(Here is the list of recent villagers tribute\\:)(?P(\\n[1-9]{2} [a-zA-Z]+ [0-9]{4} [0-9]{2}\\:[0-9]{2} - [a-zA-Z]+ x [0-9]+, [0-9]+🔥)+)$", + "rule": "^(Here is the list of recent villagers tribute\\:)(?P(\\n[1-9]{2} [a-zA-Z]+ [0-9]{4} [0-9]{2}\\:[0-9]{2} - [a-zA-Z ]+ x [0-9]+, [0-9]+🔥)+)$", "msg_type": "msg_tributes_stats_ack", "chat_id": 0, "user_id": 0 diff --git a/msg.go b/msg.go index c9fc4f1..64c0741 100644 --- a/msg.go +++ b/msg.go @@ -280,7 +280,7 @@ func parseSubTypeMessageTributesStatsAck(m *ChatWarsMessage, r *regexp.Regexp) ( cwm.Msg = m tributes := []ChatWarsTribute{} - re := regexp.MustCompile(`(\n(?P[1-9]{2} [a-zA-Z]+ [0-9]{4} [0-9]{2}:[0-9]{2}) - (?P[a-zA-Z]+) x (?P[0-9]+), (?P[0-9]+)🔥)`) + re := regexp.MustCompile(`(\n(?P[1-9]{2} [a-zA-Z]+ [0-9]{4} [0-9]{2}:[0-9]{2}) - (?P[a-zA-Z ]+) x (?P[0-9]+), (?P[0-9]+)🔥)`) for _, l := range re.FindAllStringSubmatch(r.ReplaceAllString(m.Text, "${Tributes}"), -1) { tribute := ChatWarsTribute{} d, err := fromChatWarsDate(re.ReplaceAllString(l[0], "${Date}"))