[Release] IP Ban command by Twisted

03/29/2012 19:39 420twisted1#16
heres the thing if i can get CDPSrvr::LoadIPCut( LPCSTR lpszFileName ) to work in the command this code will work perfect but i cant call it because it is in dpsrvr in acountserver and when i try it looks in dpservr in worldserver for LoadIPCut

can some one give me advice as to how to call this?

ps... I'm also working on a temp ban command that allows you to select how long a user is banned for 1 - 30 days

Code:
BOOL TextCmd_PERM_BAN( CScanner & scanner )
{
#ifdef __WORLDSERVER
	CUser* pUser = (CUser*)scanner.dwValue;
	
	scanner.GetToken();
	u_long idTarget	= CPlayerDataCenter::GetInstance()->GetPlayerId( scanner.token );

	if( idTarget == 0 )
		idTarget = pUser->m_idPlayer;

	CUser* pTarget	= g_UserMng.GetUserByPlayerID( idTarget );	

	if( !IsValidObj( pTarget ) )
	{
		pUser->AddText( "Invalid target name." );		
		return TRUE;
	}
	
	CString TNickName;
	CString UNickName;
	char szBannish[MAX_PATH];
	CString strTargetIp;
	CString strPath;
	TNickName = pTarget->GetName();
	UNickName = pUser->GetName();
	CString strIp = pTarget->m_playAccount.lpAddr;
	CString strAccnt = pTarget->m_playAccount.lpszAccount;
	
	if( pUser->IsAuthHigher( AUTH_GAMEMASTER ) ) 
	{
	    sprintf( szBannish, "%s , you have been Banned by [Staff member]--> %s", TNickName, UNickName );
	    pTarget->AddText( szBannish );
		strTargetIp.Format( "%s - %s // Accnt %s  UserNname %s was banned by Staff member %s ", strIp,  strIp, strAccnt, TNickName, UNickName );
		strPath.Format( "..\\Program\\IPCut.ini" );
		DSystemLog( strTargetIp, strPath, 0 );
// -> //LoadIPCut( "IPCut.ini" );
		pUser->AddText("User has been Banned");
	}
#endif // __WORLDSERVER
	return TRUE;
}
03/29/2012 21:39 Jomex#17
make a packet that worldserver will send to account server to reload ipcut.ini on packet receive.

EDIT:also in your command you have to dc target user.
03/30/2012 04:03 420twisted1#18
Quote:
Originally Posted by Jomex View Post
make a packet that worldserver will send to account server to reload ipcut.ini on packet receive.

EDIT:also in your command you have to dc target user.
yea i already added the d/c part working on making the packet
08/21/2014 05:32 Ecrypter#19
hi how can i banned totally or permanent ip ban of the player in the server.,


sorry for my bad english., thanks in advance
08/21/2014 18:41 Ętheria#20
Quote:
Originally Posted by Ecrypter View Post
hi how can i banned totally or permanent ip ban of the player in the server.,


sorry for my bad english., thanks in advance
"/ban username" || Richtig Comedy der Junge
08/26/2014 19:03 DerHeiligeJesus#21
I get an error :

\Source\Program\_Interface\FuncTextCmd.cpp(757): error C3861: 'DSystemLog': identifier not found, even with argument-dependent lookup

can you told me how to add DSystemLog?
08/26/2014 19:50 Ecrypter#22
how can i banned ip of the payers not the character.,

thanks in advance
08/27/2014 04:09 Sedrika#23
Click on a player and then use /ip so you see his/her ip. Now add it into the Ipcut.ini and let the account server reload it.
09/03/2014 15:10 Ecrypter#24
Quote:
Originally Posted by Sedrika View Post
Click on a player and then use /ip so you see his/her ip. Now add it into the Ipcut.ini and let the account server reload it.

can you give me exact details how the proper putting ip in the ipcute because i see this

ip 79.194.0.0 - 79.194.255.255

thanks in advance to your reply