diff --git a/main.go b/main.go index e9cfc6c..a6bddd8 100644 --- a/main.go +++ b/main.go @@ -81,6 +81,7 @@ func main() { if *initdb { initDB() } + resetMsgParsingRules() msgParsingRules, err = loadMsgParsingRules() logOnError(err, "Message parsing rules") diff --git a/sql.go b/sql.go index e3c08b9..3b96989 100644 --- a/sql.go +++ b/sql.go @@ -254,12 +254,6 @@ func initDB() { ;`) failOnError(err, "initDB : populate table code_obj_sub_type") - _, err = db.Exec(`INSERT INTO msg_rules (prio, msg_type_id, descn, rule) - VALUES (5000, ` + strconv.Itoa(objSubTypeMessageReport) + `, "Player war report", "^(?P[🐉🦅🐺🦈🦌🥔🌑])(?P(\\[[A-Z]{3}\\]){0,1})(?P([A-Za-z0-9 ]*)) ⚔:(?P[0-9]+)(?P\\((-|\\+)[0-9]+\\)){0,1} 🛡:(?P[0-9]+) Lvl: (?P[0-9]+)\\nYour result on the battlefield:\\n🔥Exp: (?P[0-9]+)\\n💰Gold: (?P-{0,1}[0-9]+)\\n📦Stock: (?P-{0,1}[0-9]+)(\\n)*(?P(🔋Stamina restored)){0,1}(\\n)*(?P(⚡Critical strike)){0,1}(\\n)*(?s:.*)$") - ,(5000, ` + strconv.Itoa(objSubTypeMessageAuctionAnnounce) + `, "Auction annouce", "^Lot #(?P[0-9]+) : (?P.*)\\nSeller: (?P.*)\\nCurrent price: (?P[0-9]+) pouch\\(es\\)\\nBuyer: (?P.*)\\nEnd At: (?P.*)\\nStatus: (?P.*)(\\n)*(?s:.*)") - ,(5000, ` + strconv.Itoa(objSubTypeMessageTime) + `, "Time", "^In Chat Wars world now\\n(?P