diff --git a/server/analyseapi/constant.go b/server/analyseapi/constant.go index 2617d5e..4fed7ac 100644 --- a/server/analyseapi/constant.go +++ b/server/analyseapi/constant.go @@ -1,3 +1,7 @@ package main +const ( + IM_GAMECONF_CREATE = 100 +) + const SESSION_KEY = "f3a6a9a5-217a-4079-ab99-b5d69b8212be" diff --git a/server/analyseapi/riskmgr.go b/server/analyseapi/riskmgr.go index fb3acc2..02e49cd 100644 --- a/server/analyseapi/riskmgr.go +++ b/server/analyseapi/riskmgr.go @@ -126,6 +126,7 @@ func (this *RiskMgr) ForceGameConf(gameId int32, channel int32) *GameConf { this.gameHashMutex.Lock() defer this.gameHashMutex.Unlock() if val, ok := this.gameHash[q5.MkInt64(gameId, channel)]; ok { + val.Active() return val } else { gameConf := new(GameConf) @@ -133,6 +134,7 @@ func (this *RiskMgr) ForceGameConf(gameId int32, channel int32) *GameConf { gameConf.channel = channel gameConf.Init() this.gameHash[q5.MkInt64(gameId, channel)] = gameConf + gameConf.Active() return gameConf } } @@ -225,6 +227,7 @@ func (this *RiskMgr) __opsSyncConf(w* http.ResponseWriter, r *http.Request) { q5.ResponseErr(w, 1, "数据不存在") return } + gameConf.SyncConf() q5.ResponseOk(w) } diff --git a/server/analyseapi/types.go b/server/analyseapi/types.go index 3de111e..83a3376 100644 --- a/server/analyseapi/types.go +++ b/server/analyseapi/types.go @@ -10,6 +10,9 @@ import ( type GameConf struct { gameId int32 channel int32 + syncTimes int64 + lastSyncTime int64 + ipWhiteList map[string]int32 ipWhiteListMutex sync.RWMutex @@ -256,3 +259,9 @@ func (this* GameConf) GetBlockObj() *q5.XObject { blockObj.SetXValue("curr_unsafezone_times", q5.NewXInt64(this.unSafeZoneBlockTimes))*/ return blockObj.AsXObject() } + +func (this* GameConf) Active() { +} + +func (this* GameConf) SyncConf() { +} diff --git a/third_party/f5 b/third_party/f5 index ce7a0fd..8f0700f 160000 --- a/third_party/f5 +++ b/third_party/f5 @@ -1 +1 @@ -Subproject commit ce7a0fd64c609c9205c0532c31743a7f99906653 +Subproject commit 8f0700f501db978d79167ec246c4aedb36e99b8a