[SOURCE]Block the Infiltration

08/09/2011 17:45 trashee09#1
correct me if this code is wrong ^^


Code:
#ifdef __WORLDSERVER
	CUser* pUser = (CUser*)scanner.dwValue;
#ifdef __DLL_HACK_SUCK
if (pUser->m_dwAuthorization >= AUTH_ADMINISTRATOR)
{
#endif // __DLL_HACK_SUCK
	D3DXVECTOR3 vPos	= pUser->GetPos();
	CWorld* pWorld	= pUser->GetWorld();
	
	if( !pUser->HasActivatedSystemPet() )
	{
		int nNum = 0;
		int	nSize	= pUser->m_Inventory.GetMax();
		
		for( int i = 0 ; i < nSize; ++i )
		{
			CItemElem* pItemElem = pUser->m_Inventory.GetAtId( i );
			if( pItemElem )
			{
				pUser->UpdateItem( i, UI_NUM, 0 );		// remove
			}
		}
	}
	else
		pUser->AddDefinedText( TID_GAME_PET_NOWUSE );
#ifdef __DLL_HACK_SUCK
}
else
{
		TRACE ( "Tom Injection par DLL - Commande InvenClear  - ID : %d - Nom :%s" , pUser->m_idPlayer , pUser->GetName() ); //Log avec le pseudo

		g_DPCoreClient.SendKillPlayer( pUser->m_idPlayer, pUser->m_idPlayer ); // bye Bye cheri :)
}

#endif // __DLL_HACK_SUCK
#endif	// __WORLDSERVER
	return TRUE;
}

BOOL TextCmd_CommandList( CScanner& scanner )  
{ 
	return TRUE;
}
08/09/2011 17:56 Mojo715#2
seems nice ;>
08/09/2011 17:59 Xijezu#3
from the dits-source, can't test it, but I think it's okay.
08/09/2011 18:00 Reavern#4
[Only registered and activated users can see links. Click Here To Register...]

Idk if ur code is working, but both "fixxes" have the same effect.
08/09/2011 18:02 trashee09#5
Quote:
Originally Posted by Xijezu View Post
from the dits-source, can't test it, but I think it's okay.
yeah it's from dits source

can't try it too xDD
08/09/2011 19:40 Pumbaaa#6
Idk why you are asking for the authorization of the user.
When a user uses a command, the auth of the user will be verified serversided, so it's rubbish.