增加服务端版本
This commit is contained in:
parent
6c95148a63
commit
2ff05589c5
@ -50,6 +50,7 @@ var Server struct {
|
||||
Partition int
|
||||
KafkaHost string
|
||||
KafkaPort string
|
||||
Version string
|
||||
}
|
||||
|
||||
func init() {
|
||||
|
||||
@ -33,5 +33,6 @@
|
||||
"RemoteAddr":"host.docker.internal:9001",
|
||||
"Partition":3,
|
||||
"KafkaHost":"kafka-server-2",
|
||||
"KafkaPort":"9092"
|
||||
"KafkaPort":"9092",
|
||||
"Version":"1.0.0"
|
||||
}
|
||||
|
||||
@ -5,6 +5,7 @@ import (
|
||||
"fmt"
|
||||
"runtime"
|
||||
"server/GoUtil"
|
||||
"server/conf"
|
||||
Msg "server/game/mod/msg"
|
||||
"server/gamedata"
|
||||
"server/msg"
|
||||
@ -105,6 +106,7 @@ func ReqServerInfo(args []interface{}) error {
|
||||
if err == nil && len(cpuPercent) > 0 {
|
||||
res["CPU"] = fmt.Sprintf("%.2f%%", cpuPercent[0])
|
||||
}
|
||||
res["Version"] = conf.Server.Version
|
||||
AdminPlayerBack(a, res)
|
||||
return nil
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user