1
This commit is contained in:
parent
465efbdb80
commit
0bba2012a8
@ -28,7 +28,7 @@ static void _GMOpsReload(f8::JsonHttpRequest* request)
|
|||||||
MetaMgr::Instance()->Reload();
|
MetaMgr::Instance()->Reload();
|
||||||
request->resp_xobj->SetVal("errcode", 0);
|
request->resp_xobj->SetVal("errcode", 0);
|
||||||
request->resp_xobj->SetVal("errmsg", "");
|
request->resp_xobj->SetVal("errmsg", "");
|
||||||
a8::UdpLog::Instance()->Warning("reload config files", {});
|
a8::UdpLog::Instance()->Info("reload config files", {});
|
||||||
}
|
}
|
||||||
|
|
||||||
static void _GMOpsStopService(f8::JsonHttpRequest* request)
|
static void _GMOpsStopService(f8::JsonHttpRequest* request)
|
||||||
@ -45,11 +45,19 @@ static void _GMOpsStartService(f8::JsonHttpRequest* request)
|
|||||||
App::Instance()->servicing = true;
|
App::Instance()->servicing = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void _GMOpsOnlineUserNum(f8::JsonHttpRequest* request)
|
static void _GMOpsServerInfo(f8::JsonHttpRequest* request)
|
||||||
{
|
{
|
||||||
request->resp_xobj->SetVal("errcode", 0);
|
request->resp_xobj->SetVal("errcode", 0);
|
||||||
request->resp_xobj->SetVal("errmsg", "");
|
request->resp_xobj->SetVal("errmsg", "");
|
||||||
request->resp_xobj->SetVal("user_num", App::Instance()->perf.entity_num[ET_Player]);
|
request->resp_xobj->SetVal("node_id", App::Instance()->node_id);
|
||||||
|
request->resp_xobj->SetVal("instance_id", App::Instance()->instance_id);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void _GMStatGetRealTimeOnline(f8::JsonHttpRequest* request)
|
||||||
|
{
|
||||||
|
request->resp_xobj->SetVal("errcode", 0);
|
||||||
|
request->resp_xobj->SetVal("errmsg", "");
|
||||||
|
request->resp_xobj->SetVal("num", App::Instance()->perf.entity_num[ET_Player]);
|
||||||
}
|
}
|
||||||
|
|
||||||
void HandlerMgr::Init()
|
void HandlerMgr::Init()
|
||||||
@ -59,7 +67,8 @@ void HandlerMgr::Init()
|
|||||||
RegisterGMMsgHandler("Ops@reload", _GMOpsReload);
|
RegisterGMMsgHandler("Ops@reload", _GMOpsReload);
|
||||||
RegisterGMMsgHandler("Ops@stopService", _GMOpsStopService);
|
RegisterGMMsgHandler("Ops@stopService", _GMOpsStopService);
|
||||||
RegisterGMMsgHandler("Ops@startService", _GMOpsStartService);
|
RegisterGMMsgHandler("Ops@startService", _GMOpsStartService);
|
||||||
RegisterGMMsgHandler("Ops@onlineUserNum", _GMOpsOnlineUserNum);
|
RegisterGMMsgHandler("Ops@serverInfo", _GMOpsServerInfo);
|
||||||
|
RegisterGMMsgHandler("Stat@getRealTimeOnline", _GMStatGetRealTimeOnline);
|
||||||
}
|
}
|
||||||
|
|
||||||
void HandlerMgr::UnInit()
|
void HandlerMgr::UnInit()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user