game_sync/worldsrv/serverctrl.go

20 lines
361 B
Go

package main
import (
"mongo.games.com/game/common"
"mongo.games.com/goserver/core/mongo"
)
var SrvIsMaintaining = true
func init() {
common.RegisteServerCtrlCallback(func(code int32) {
switch code {
case common.SrvCtrlStateSwitchCode:
SrvIsMaintaining = !SrvIsMaintaining
case common.SrvCtrlResetMgoSession:
mongo.ResetAllSession()
}
})
}