Anti advertsiment.
#1

Basically, I just found out that if a cop writes "/r 10-4 to 10-20 blaa blaa -121201--" type of shit, the system reports him as a server advertiser. How can I fix this without fucking it up?

Код:
stock AntiAdv(playerid, text[])
{
    // Anti Adv
    new strR[255], is1=0, r=0;
 	while(strlen(text[is1]))
 	 	{
  		if('0'<=text[is1]<='9')
  		{
	 		new is2=is1+1, p=0;
	   		while(p==0)
		  	{
		   		if('0'<=text[is2]<='9'&&strlen(text[is2]))
			   	{
				   is2++;
				}
			 	else
			  	{
				   	strmid(strR[r],text,is1,is2,255);
				   	if(strval(strR[r])<255) r++;
				    is1=is2;
				    p=1;
		    	}
		    }
	    }
    	is1++;
 	}
 	if(r>=4)
 	{
	  	new strMy[255];
	  	format(strMy, sizeof(strMy), "AdmWarn: %s is attempting to Server Advertise: %s", RPN(playerid), text);
	  	SendAdminMessage(COLOR_DARKRED, 1, strMy);
	   	new pr2;
	  	for(new z=0;z<r;z++)
	  	{

		   	while((pr2=strfind(text,strR[z],true))!=-1)
			{
				for(new i=pr2,j=pr2+strlen(strR[z]);i<j;i++)
				{
					text[i]='*';
				}
			}
	  	}
	  	return 1;
 	}
 	return 0;
}
Reply


Messages In This Thread
Anti advertsiment. - by YoDawg - 12.12.2015, 13:49
Re: Anti advertsiment. - by Vince - 12.12.2015, 15:21
Re: Anti advertsiment. - by YoDawg - 12.12.2015, 15:57
Re: Anti advertsiment. - by Abagail - 12.12.2015, 19:40
Re: Anti advertsiment. - by SickAttack - 12.12.2015, 20:37

Forum Jump:


Users browsing this thread: 1 Guest(s)