server/CNetworkManager.cpp
// LIBRG_CONNECTION_REQUEST
// a client is requesting to connect, if someone with this name is already connected, reject
LIBRG_CONNECTION_REQUEST
a client is requesting to connect, if someone with this name is already connected, reject
LIBRG_CONNECTION_REQUEST a client is requesting to connect if someone with this name is already connected reject
void CNetworkManager::on_connect_request(librg_event_t *event)
{
	char name[MAX_PLAYER_NAME];
	strcpy(name, librg_data_rstr(event->data).c_str());
	u32 secret = librg_data_ru32(event->data);
	CLog::Log("[CNetworkManager] Client with name %s is requesting to connect\n", name);
	if (secret != iSecret)
	{
		CLog::Log("[CNetworkManager] Invalid server secret.\n");
		librg_event_reject(event);
	}
}
void CNetworkManager :: on_connect_request ( librg_event_t * event ) { char name [ MAX_PLAYER_NAME ] ; strcpy ( name , librg_data_rstr ( event -> data ) . c_str ( ) ) ; u32 secret = librg_data_ru32 ( event -> data ) ; CLog :: Log ( " \n " , name ) ; if ( secret != iSecret ) { CLog :: Log ( " \n " ) ; librg_event_reject ( event ) ; } }
LIBRG_CONNECTION_REQUEST
a client is requesting to connect, if someone with this name is already connected, reject
LIBRG_CONNECTION_REQUEST a client is requesting to connect if someone with this name is already connected reject
// Player Name