
// antiHOYGAN
// Script URI: http://www.nopuedocreer.com/quelohayaninventado/?page_id=203
// Description: "Filtro antiHOYGAN"
// Author: Dani "Troy" Gonzalez
// Version: 1.0
// Author URI: http://www.hevistocosas.com 

function filterHOYGAN (texto)
{
	swHOYGAN=false;
	msgError="";

	numLetras=texto.length;
	numMayusculas=0;
	for (i=0;i<numLetras;i++)
		if (texto.charAt(i)>='A' && texto.charAt(i)<='Z')
			numMayusculas++;
    if (numLetras>11 && numMayusculas>numLetras/4)			
    {
		swHOYGAN=true;
		msgError="Shift overload";
	}
	else
	{
		textoLower=texto.toLowerCase();
		textoLower=" "+textoLower;
		HOYGANseed = new Array("wenas","wapo","wapa","weno","fabor","kiero","nesecito","plis ","pliss","plisss","plissss","grasias","antebraso"," ke "," k "," q "," d "," pq"," xq","aaaaa","eeeeee","iiiii","ooooo","uuuuu","jajajajajajajaja","hahahaha","jejejejejejejeje","!!!!!","??????",".......","?!?!?!?!?!","!?!?!?!?!?","ddddd","fffff","ggggg","jjjjj","lllll","mmmmm","nnnnn","rrrrr","xxxxx","zzzzz","sssss");
		for (i=0;i<HOYGANseed.length;i++)
		{
			if (textoLower.indexOf(HOYGANseed[i])!=-1)
			{
				swHOYGAN=true;
				msgError=HOYGANseed[i];
				break;
			}	
		}
	}
	if (swHOYGAN)
	{	
		alert ("ALERT: AntiHOYGAN Filter FAIL!\n\n>>Offending Command: \""+msgError+"\"\n\nRevise su mensaje y vuelva a intentarlo, por favor.\n\nSi el problema persiste, puede solucionarlo accediendo a:\nwww.RAE.es\nfrikipedia.es/friki/Hoygan\n\nPowered by: nopuedocreer.com/antiHOYGAN");
		return false;
    }
    return true;
}
