upd
This commit is contained in:
parent
52ff68fb1f
commit
daa659e7a4
8
obj.go
8
obj.go
@ -29,28 +29,36 @@ var (
|
|||||||
func initCache() {
|
func initCache() {
|
||||||
var err error
|
var err error
|
||||||
|
|
||||||
|
log.Println("Caching obj_type ..")
|
||||||
err = loadObjType()
|
err = loadObjType()
|
||||||
logOnError(err, "initCache : caching obj_type")
|
logOnError(err, "initCache : caching obj_type")
|
||||||
|
|
||||||
|
log.Println("Caching obj_sub_type ..")
|
||||||
err = loadObjSubType()
|
err = loadObjSubType()
|
||||||
logOnError(err, "initCache : caching obj_sub_type")
|
logOnError(err, "initCache : caching obj_sub_type")
|
||||||
|
|
||||||
|
log.Println("Filling message parsing rules...")
|
||||||
resetMsgParsingRules()
|
resetMsgParsingRules()
|
||||||
msgParsingRules, err = loadMsgParsingRules()
|
msgParsingRules, err = loadMsgParsingRules()
|
||||||
logOnError(err, "initCache : message parsing rules")
|
logOnError(err, "initCache : message parsing rules")
|
||||||
|
|
||||||
|
log.Println("Caching castles ..")
|
||||||
err = loadObjCastle()
|
err = loadObjCastle()
|
||||||
logOnError(err, "initCache : caching castles")
|
logOnError(err, "initCache : caching castles")
|
||||||
|
|
||||||
|
log.Println("Caching guilds ..")
|
||||||
err = loadObjGuild()
|
err = loadObjGuild()
|
||||||
logOnError(err, "initCache : caching guilds")
|
logOnError(err, "initCache : caching guilds")
|
||||||
|
|
||||||
|
log.Println("Caching users ..")
|
||||||
err = loadObjUser()
|
err = loadObjUser()
|
||||||
logOnError(err, "initCache : caching user")
|
logOnError(err, "initCache : caching user")
|
||||||
|
|
||||||
|
log.Println("Caching items ..")
|
||||||
err = loadObjItem()
|
err = loadObjItem()
|
||||||
logOnError(err, "initCache : caching items")
|
logOnError(err, "initCache : caching items")
|
||||||
|
|
||||||
|
log.Println("Caching messages ..")
|
||||||
err = loadObjMsg()
|
err = loadObjMsg()
|
||||||
logOnError(err, "initCache : caching msgs")
|
logOnError(err, "initCache : caching msgs")
|
||||||
|
|
||||||
|
4
rules.go
4
rules.go
@ -2,7 +2,7 @@ package main
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"log"
|
||||||
"regexp"
|
"regexp"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -66,7 +66,7 @@ func resetMsgParsingRules() error {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fmt.Printf("resetMsgParsingRules : %d rules loaded.\n", count)
|
log.Printf("%d rules loaded.\n", count)
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user