Join Spamer
#1

Hello,how could i prevent this?This guy connects with RakSamp and just makes the chat go really fast like someone is spaming but there is no text nothing like a /cc cmd...What to do?

Код:
[23:55:16] {F5FFFA}Player '{00CCFF}nex{F5FFFA}' (ID: {00CCFF}1{F5FFFA}) joined the server
[23:55:38] 

[23:55:38] 

[23:55:38] 

[23:55:38] 

[23:55:38] 

[23:55:38] 

[23:55:38] 

[23:55:38] 

[23:55:38] 

[23:55:38] 

[23:55:38] 

[23:55:38] 

[23:55:38] 

[23:55:38] 

[23:55:38] 

[23:55:38] 

[23:55:38] 

[23:55:38] 

[23:55:38] 

[23:55:38] 

[23:55:38] 

[23:55:38] 

[23:55:38] 

[23:55:38] 

[23:55:38] 

[23:55:38] 

[23:55:38] 

[23:55:38] 

[23:55:38] 

[23:55:39] 

[23:55:39] 

[23:55:39] 

[23:55:39] 

[23:55:39] 

[23:55:39] 

[23:55:39] 

[23:55:39] 

[23:55:39] 

[23:55:39] 

[23:55:39] 

[23:55:39] 

[23:55:39] 

[23:55:39] 

[23:55:39] 

[23:55:39] 

[23:55:39] 

[23:55:39] 

[23:55:39] 

[23:55:39] 

[23:55:39] 

[23:55:39] 

[23:55:39] 

[23:55:39] 

[23:55:39] 

[23:55:39] 

[23:55:39] 

[23:55:39] 

[23:55:39] 

[23:55:39] 

[23:55:39] 

[23:55:39] 

[23:55:40] 

[23:55:40] 

[23:55:40] 

[23:55:40] 

[23:55:40] 

[23:55:40] 

[23:55:40] 

[23:55:40] 

[23:55:40] 

[23:55:40] 

[23:55:40] 

[23:55:40] 

[23:55:40] 

[23:55:40] 

[23:55:40] 

[23:55:40] 

[23:55:40] 

[23:55:40] 

[23:55:40] 

[23:55:40] 

[23:55:40] 

[23:55:40] 

[23:55:40] 

[23:55:40] 

[23:55:40] 

[23:55:40] 

[23:55:40] 

[23:55:40] 

[23:55:40] 

[23:55:40] 

[23:55:40] 

[23:55:40] 

[23:55:40] 

[23:55:41] 

[23:55:41] 

[23:55:41] 

[23:55:41] 

[23:55:41] 

[23:55:41] 

[23:55:41] 

[23:55:41] 

[23:55:41] 

[23:55:41] 

[23:55:41] 

[23:55:41] 

[23:55:41] 

[23:55:41] 

[23:55:41] 

[23:55:41] 

[23:55:41] 

[23:55:41] 

[23:55:41] 

[23:55:41] 

[23:55:42] 

[23:55:42] 

[23:55:42] 

[23:55:42] 

[23:55:42] 

[23:55:42] 

[23:55:42] 

[23:55:42] 

[23:55:42] 

[23:55:42] 

[23:55:42] 

[23:55:42] 

[23:55:42] 

[23:55:42] 

[23:55:42] 

[23:55:42] 

[23:55:43] 

[23:55:43] 

[23:55:43]
Reply
#2

Make a variable. When the player enters something in the chat box, add +1 at the variable.
When the variable = 10 (for example), met him. Put a timer of 30 secs which reset the variable. Every time the player enter a message, the timer restarts (kill the timer and put it again).
- public OnPlayerText(playerid, text[])
Reply
#3

Can you make an example code?
Reply
#4

Alright. I think there is no errors.
PHP код:
new AntiSpammTimer;
new 
AntiSpamm[MAX_PLAYERS];
new 
bool:MutedPlayer[MAX_PLAYERS];
public 
OnPlayerText(playeridtext[])
{
    if(
MutedPlayer[playerid]) return 0;
    
AntiSpamm[playerid]++;
    
KillTimer(AntiSpammTimer);
    
AntiSpammTimer SetTimerEx("AntiSpammTimer"30000false"i"playerid);
    if(
AntiSpamm[playerid] == 10)
    {
        
SendClientMessage(playerid, -1"You are now muted for spamming.");
        
AntiSpamm[playerid] = 0;
        
MutedPlayer[playerid] = true;
        
KillTimer(AntiSpammTimer);
        
AntiSpammTimer SetTimerEx("AntiSpammTimer"120000false"i"playerid);
        return 
0;
    }
    return 
1;
}
forward AntiSpammFunction(playerid);
public 
AntiSpammFunction(playerid)
{
    
AntiSpamm[playerid] = 0;
    
MutedPlayer[playerid] = false;
    return 
1;

If you need explications, say it.
Reply
#5

One question just,I have an anti spam system already but it doesnt help against this kind of "atack".Will yours?
Reply
#6

I don't know but this example should work, I haven't anti spam system. You should put yours here to see why he dosn't works.
NB: The example works perfectly.
Reply
#7

Here it is
PHP код:
 new TCountKMessage[128];
    
TCount GetPVarInt(playerid"TextSpamCount");
    
TCount++;
    
SetPVarInt(playerid"TextSpamCount"TCount);
    if(
TCount == 2)
    {
         
SendClientMessage(playerid0xFFFFFF"[Anti-Spam]: NE SPAMAJ! (1/3)");
    }
    else if(
TCount == 3) {
        
SendClientMessage(playerid0xFFFFFF"[Anti-Spam]: NE SPAMAJ!!! (2/3)");    }
    else if(
TCount == 4) {
        
GetPlayerName(playeridKMessagesizeof(KMessage));
        
format(KMessagesizeof(KMessage), "[Anti-Spam]: %s je kikan zbog spamanja na chatu."KMessage);
        
SendClientMessageToAll(0xFF9900AAKMessage);
        print(
KMessage);
        
Kick(playerid);
    }
    
SetTimerEx("ResetCount"SpamLimitfalse"i"playerid);
     if(
DetectarSpam(text)) { SendClientMessage(playerid,0xFFFFFFFF,"[Anti-Spam]: NE REKLAMIRAJ!!!"); return 0; }
    return 
1;
}
public 
ResetCount(playerid)
{
        
SetPVarInt(playerid"TextSpamCount"0);
}
stock DetectarSpam(SPAM[])
{
    new 
SSPAM;
    new 
CUENTAP,CUENTAN,CUENTAW,CUENTADP;
    for(
SSPAM 0SSPAM strlen(SPAM); SSPAM ++)
    {
        if(
SPAM[SSPAM] == '.'CUENTAP ++; //Cuenta los Puntos
        
if(SPAM[SSPAM] == '0' || SPAM[SSPAM] == '1' || SPAM[SSPAM] == '2' || SPAM[SSPAM] == '3' || SPAM[SSPAM] == '4' || SPAM[SSPAM] == '5' || SPAM[SSPAM] == '6' || SPAM[SSPAM] == '7' || SPAM[SSPAM] == '8' || SPAM[SSPAM] == '9'CUENTAN ++; //Cuenta los Numeros
        
if(SPAM[SSPAM] == 'w' || SPAM[SSPAM] == 'W'CUENTAW ++; //Cuenta las "W"
        
if(SPAM[SSPAM] == ':'CUENTADP ++; //Cuenta los ":"
    
}
     if(
CUENTAP >= && CUENTAN >= 4) return 1;
     if(
CUENTAW >= 3) return 1;
     if(
strfind(SPAM".com"true) != -|| strfind(SPAM".com.ar"true) != -|| strfind(SPAM".org"true) != -|| strfind(SPAM".net"true) != -|| strfind(SPAM".es"true) != -|| strfind(SPAM".tk"true) != -1) return 1;
     if(
CUENTADP >= && CUENTAN >= 4) return 1;
     return 
0;

Reply
#8

Oh.. Your antispamm system is against ads. He should work if the player put a link in chat or something like this.
But he won't work if the player enters others things.
Reply
#9

What do you mean by "other things"?
Reply
#10

Код:
D:\srw\gamemodes\NG.pwn(1696) : error 029: invalid expression, assumed zero
D:\srw\gamemodes\NG.pwn(1696) : error 017: undefined symbol "AntiSpammFunction"
PHP код:
forward AntiSpammFunction(playerid); 
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)