添加启动自己ip读取

This commit is contained in:
aozhiwei 2021-06-21 05:29:38 +00:00
parent 2067f8a6a3
commit 36884b36f1
3 changed files with 11 additions and 2 deletions

View File

@ -47,6 +47,16 @@ void JsonDataMgr::Init()
if (GetConf()->HasKey("channel")) {
channel = GetConf()->At("channel")->AsXValue();
}
#ifdef DEBUG
if (!f8::IsOnlineEnv()) {
if (!f8::IsTestEnv()) {
bool ok = a8::GetLocalIp(ip);
if (!ok) {
abort();
}
}
}
#endif
server_info = a8::Format("%s:%d", {ip, listen_port});
Reload();

View File

@ -98,7 +98,6 @@ static RoomType_e GetHumanRoomType(const cs::CMJoin& msg, int& game_times)
void RoomMgr::Init()
{
InstallReportStateTimer();
gm_hash_["6001_2005_oTR6b5d0UzpqJ1w-QbdUawWimgz0"] = 1;
}
void RoomMgr::UnInit()

@ -1 +1 @@
Subproject commit f0ee3fb68faa185ff78f4c59c9a1edeb91b70031
Subproject commit b16f9a6176bfac30c0e7d29ec6df37e750fd1c60