SA-MP Forums Archive
[Ajuda] Nick: con bugando server - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] Nick: con bugando server (/showthread.php?tid=450614)



Nick: con bugando server - cawlv - 13.07.2013

Gente fiz de tudo pra bloquear o cara usei anti mal bot, bloqueador de nicks, troquei porta do server para ver se a porta й bugada tentei de tudo mas nгo consigo.
o cara consegue entrar, alguйm pode me dizer oque posso fazer? eu uso um VPS, poderiam me dar um rumo do que fazer?

Desde jб agradeзo.


Re: Nick: con bugando server - Don_Speed - 13.07.2013

Explique melhor e poste mal bot!


Re: Nick: con bugando server - silenthill - 13.07.2013

uma vez fui atacado com essses bot eu botei no onplayconnect isso aki tipo antbot p barrar -' mo saco

pawn Код:
if(strfind(Nome(playerid),"com1",true) != -1)
{
Ban(playerid);
}
if(strfind(Nome(playerid),"com2",true) != -1)
{
Ban(playerid);
}
if(strfind(Nome(playerid),"com3",true) != -1)
{
Ban(playerid);
}



Re: Nick: con bugando server - cawlv - 13.07.2013

Quote:
Originally Posted by Don_Speed
Посмотреть сообщение
Explique melhor e poste mal bot!
Bom й simples o cara entra com o nick con e ele congela o server entende?


PHP код:
#include <a_samp>
#define _CHANGE_NAME_BEFORE_KICK    true
stock
    bool
:    bIllegalPlayer    MAX_PLAYERS ]    = false,
            
szTmpKickName    MAX_PLAYER_NAME ];
public 
OnFilterScriptInit( )
{
    print( 
"* Bad name protection has been enabled." );
    print( 
"* The following names are forbidden to join your server:" );
    print( 
"\tcom[1-9], lpt[1-9], clock$, nul, aux, prn, con" );
    
#if _CHANGE_NAME_BEFORE_KICK == true
    
for ( new 0MAX_PLAYER_NAMEi++ )
        
szTmpKickName] = '_';
    
szTmpKickNameMAX_PLAYER_NAME ] = '\0';
    print( 
"* The temporary name used to disconnect crashers will be:" );
    
printf"\t%s"szTmpKickName );
    
#endif
    
return 1;
}
public 
OnPlayerConnectplayerid )
{
    new
        
szPlayerNameMAX_PLAYER_NAME ];
    
bIllegalPlayerplayerid ] = false;
    
GetPlayerNameplayeridszPlayerNameMAX_PLAYER_NAME );
    if ( !
strcmpszPlayerName"com"true) || !strcmpszPlayerName"lpt"true) )
    {
        if ( 
szPlayerName] >= '0' && szPlayerName] <= '9' && szPlayerName] == '\0' )
            return 
aKickplayeridszPlayerName );
    }
    else if ( !
strcmpszPlayerName"clock$"true) )
        return 
aKickplayeridszPlayerName );
    else
    {
        static const
            
szForbiddenName[ ][ ] =
            {
                
"nul""aux",
                
"prn""con"
            
};
        for ( new 
0sizeofszForbiddenName ); i++ )
        {
            if ( !
strcmpszPlayerNameszForbiddenName], true) )
                return 
aKickplayeridszPlayerName );
        }
        
#if _CHANGE_NAME_BEFORE_KICK == true
        // Players cannot join with our temporary kicking name either...
        // this name is "________________" by default which you probably don't want anyways.
        
if ( !strcmpszPlayerNameszTmpKickNametrueMAX_PLAYER_NAME ) )
            return 
aKickplayeridszPlayerName );
        
#endif
    
}
    return 
1;
}
public 
OnPlayerDisconnectplayeridreason )
{
    if ( 
bIllegalPlayerplayerid ] )
    {
        
bIllegalPlayerplayerid ] = false;
        return 
0;
    }
    return 
1;
}
stock aKickplayeridpname[ ] )
{
    new
        
szIP16 ];
    
bIllegalPlayerplayerid ] = true;
    
#if _CHANGE_NAME_BEFORE_KICK
    
SetPlayerNameplayeridszTmpKickName );
    
#endif
    
GetPlayerIpplayeridszIP16 );
    
SendClientMessageplayerid0xFFFFFFFF"SERVER: You have been because you have an illegal nickname." );
    
Kickplayerid );
    
printf"[protect] %s (%d:%s) was kicked for an illegal nickname."pnameplayeridszIP );
    return 
0;




Re: Nick: con bugando server - ShutDown_ - 13.07.2013

Tenta usar isto: https://sampforum.blast.hk/showthread.php?tid=384222


Re: Nick: con bugando server - cawlv - 14.07.2013

Quote:
Originally Posted by ShutDown_
Посмотреть сообщение
jб usei parecidos mas testarei tambйm.


Re: Nick: con bugando server - cawlv - 14.07.2013

Sem chance, quero saber pq alguns servidores vocк consegue entrar com esse nick atй jogar.


Re: Nick: con bugando server - ShutDown_ - 15.07.2013

Quote:
Originally Posted by cawlv
Посмотреть сообщение
Sem chance, quero saber pq alguns servidores vocк consegue entrar com esse nick atй jogar.
Creio que esses nicks sу crashem servidores em Windows.
Em servidores hospedados com sistema operacional Linux, simplismente nгo acontece nada, da pra jogar fazer qualqer coisa.


Re: Nick: con bugando server - TheKoDaK - 15.07.2013

Coloca isso aki na public OnPlayerConnect
pawn Код:
public OnPlayerConnect(playerid)
{
    new Bots[MAX_PLAYER_NAME];
    GetPlayerName(playerid, Bots, MAX_PLAYER_NAME);
    if(!strcmp("con", Bots, true)  || !strcmp("aux", Bots, true)  || !strcmp("com4", Bots, true) || !strcmp("com8", Bots, true)
    || !strcmp("lpt3", Bots, true) || !strcmp("lpt7", Bots, true) || !strcmp("com1", Bots, true) || !strcmp("com5", Bots, true)
    || !strcmp("com9", Bots, true) || !strcmp("lpt5", Bots, true))
    {
        SetPlayerName(playerid, "O_Mais_Lixo");
        BanEx(playerid, "Anti-Bot");
        return 1;
    }



Re: Nick: con bugando server - StrondA_ - 15.07.2013

Servidores que й permitido a entrada sгo hospedados por linux.