bool NFCWorldToMasterModule::Execute()
{
	m_pNetClientModule->Execute();
	ServerReport();
	return true;
}
void NFCWorldNet_ServerModule::OnClientDisconnect(const NFSOCK nAddress)
{
    NF_SHARE_PTR<ServerData> pServerData =  mGameMap.First();
    while (pServerData)
    {
        if (nAddress == pServerData->nFD)
        {
            pServerData->pData->set_server_state(NFMsg::EST_CRASH);
            pServerData->nFD = 0;

			ServerReport(pServerData->pData->server_id(), NFMsg::EST_CRASH);
            SynGameToProxy();
            break;
        }

        pServerData = mGameMap.Next();
    }

    //////////////////////////////////////////////////////////////////////////

    pServerData =  mProxyMap.First();
    while (pServerData)
    {
        if (nAddress == pServerData->nFD)
        {
            pServerData->pData->set_server_state(NFMsg::EST_CRASH);
            pServerData->nFD = 0;

            int nServerID = pServerData->pData->server_id();
            mProxyMap.RemoveElement(nServerID);

			ServerReport(pServerData->pData->server_id(), NFMsg::EST_CRASH);
			SynGameToProxy();
            break;
        }

        pServerData = mProxyMap.Next();
    }


	//////////////////////////////////////////////////////////////////////////

	pServerData = mDBMap.First();
	while (pServerData)
	{
		if (nAddress == pServerData->nFD)
		{
            pServerData->pData->set_server_state(NFMsg::EST_CRASH);
            pServerData->nFD = 0;

			int nServerID = pServerData->pData->server_id();
			mDBMap.RemoveElement(nServerID);

			ServerReport(pServerData->pData->server_id(), NFMsg::EST_CRASH);
			SynDBToGame();
			break;
		}

		pServerData = mDBMap.Next();
	}
}
bool NFCProxyServerToWorldModule::Execute()
{
	ServerReport();
	return true;
}