This commit is contained in:
shoopea 2019-12-29 16:44:23 +08:00
parent 01508d0207
commit 89ebfb6358

14
sql.go
View File

@ -744,11 +744,11 @@ func insertMsgPillageInc(m *ChatWarsMessagePillageInc) error {
func loadMsgParsingRules() (m map[int]MessageParsingRule, err error) {
var (
id int32
priority int32
descn string
rule string
msgTypeID int64
id int32
priority int32
descn string
rule string
msgTypeID64 int64
)
log.Println("Loading message parsing rules...")
@ -769,7 +769,7 @@ func loadMsgParsingRules() (m map[int]MessageParsingRule, err error) {
defer rules.Close()
for rules.Next() {
err = rules.Scan(&id, &priority, &descn, &rule, &msgTypeID)
err = rules.Scan(&id, &priority, &descn, &rule, &msgTypeID64)
if err != nil {
return m, err
}
@ -778,7 +778,7 @@ func loadMsgParsingRules() (m map[int]MessageParsingRule, err error) {
i.Priority = priority
i.Description = descn
i.Rule = rule
i.MsgTypeID = msgTypeID
i.MsgTypeID64 = msgTypeID64
i.re = regexp.MustCompile(rule)
m[count] = *i
// log.Printf("New rule : %s\n", rule)