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;
}