KVirc binary configuration file
Please do not edit!
[EVENT OnStartup ENABLED bytes 110]
inicio
ruido welcome.wav
timer -s (cartel,500) cartel
option szCaptionMessage "iNGENIO ScripT "$config(a,sver)
[ENDEVENT]
[EVENT OnShutdown ENABLED bytes 17]
ruido goodbye.wav
[ENDEVENT]
[EVENT OnServerPing DISABLED bytes 0]

[ENDEVENT]
[EVENT OnConnect ENABLED bytes 399]
ruido connected.wav;
%Huboxnick=0;
%Antipubli=0;
%Antipublim=1;
%Sp=3;
%Away=0;
%Mirandocanales=vacio,;
			%Unmasknick=;		
			%Unmaskwho=;
			%Unmaske=;
			%Unmaskl=;
			%Unmask=;
			%Unmaskav=;
			%Unmaskci=;
			%Unmaskstring=;
			%Unmasktam=;
			%Unmaskfin=;
			%Unmaskn=;
			%Unmaskip=;
timer -w=$console (lag,$config(a,mlag)) {
	lag
	}
option szCaptionMessage "-- iNGENIO ScripT $config(a,sver)"
[ENDEVENT]
[EVENT OnDisconnect ENABLED bytes 156]
killtimer -q lag
killtimer -q rejoin*
ruido disconnected.wav
option szCaptionMessage "iNGENIO ScripT "$config(a,sver)
%Away=0
%Awayreplay=1
%Actualizanick=0
[ENDEVENT]
[EVENT OnIrc DISABLED bytes 0]

[ENDEVENT]
[EVENT OnJoin ENABLED bytes 1214]
#Se fija si el canal esta registrado
if($strFind(","$1",",$config(a,canales_conf))==-1) %confi="a"
else %confi="a_cfg_canal_"$1


#Genera echo
echo -i=12 -w=$1 $B"Entra..."$B $2  $StrReplace($3,"~","")"@"$4;

#Si soy Op
if($isOp($1,$me)){
   #si esta registrado
   if ($IsReg($Mask(5,$2)) || $IsReg($Mask(9,$2))) {
	   #registrado con que flag
         if ("$GetFlags($Mask(5,$2))"=="k" || "$GetFlags($Mask(9,$2))"=="k") kick $1 $2
         if ("$GetFlags($Mask(5,$2))"=="b" || "$GetFlags($Mask(9,$2))"=="b") {	
                  kick $1 $2;
                  ban $1 $Mask(9,$2);
                  }
         if ("$GetFlags($Mask(5,$2))"=="v" || "$GetFlags($Mask(9,$2))"=="v") voice $1 $2;
         if ("$GetFlags($Mask(5,$2))"=="a" && "$GetFlags($Mask(9,$2))"=="a") {
			if ($config(%confi,alop)) op $1 $2;
			}
         #No conoce el IP, pero conoce el usuario y no aliado
         if ("$GetFlags($Mask(5,$2))"!="" && "$GetFlags($Mask(9,$2))"=="" && "$GetFlags($Mask(5,$2))"!="a") {
                  %f=$GetFlags($Mask(5,$2)); 
                  register $Mask(0,$2) %f;
                  }
   }
}

#autoclonscan
if ($config(%confi,autoclonscan)) clonscan2 $1 $2;

#contador
%Num++
if (%Num==90000) %Num=1

halt
[ENDEVENT]
[EVENT OnChannelSync DISABLED bytes 0]

[ENDEVENT]
[EVENT OnMeJoin ENABLED bytes 266]
%Antipubli=1
timer -s (antipubli,30000) %Antipubli=0
ruido joining_channel.wav

%Mirandocanales<,$1
%Nomesgnoop++
timer -s (Nomesgnoop,20000) %Nomesgnoop=0

if ($IsTimer(rejoin$1)) {
	killtimer -q rejoin$1
	if ($iswindow(*Reingreso_$1)) window *Reingreso_$1 close
	}
[ENDEVENT]
[EVENT OnPart ENABLED bytes 781]
echo -i=17 -w=$1 $B"Sale..."$B $2  $StrReplace($3,"~","")"@"$4;                                                                                                                                                                                                                                                                                                                                                                                                                                                    %Sp++;%nicks=$2;if (%Sp>1 && !$isop($1,$2)) {frase;timer -s (spm%Num,2000,%nicks) {	NOTICE -s $timermagic $K\1,11 $K\1,2 $K\0,12 $B iNGENI\{\} ScripT $config(a,sver) $B  $K\1,2 $K\1,11 $O http://move.to/ingenio for Kvirc $config(a,kver) $B[%Frase]!!!;	}	%Sp=0;}               
halt;
[ENDEVENT]
[EVENT OnMePart ENABLED bytes 30]
ruido leaving_channel.wav
halt
[ENDEVENT]
[EVENT OnKick ENABLED bytes 729]
#Se fija si el canal esta registrado
if($strFind(","$1",",$config(a,canales_conf))==-1) %confi="a"
else %confi="a_cfg_canal_"$1

#Si soy Op
if($isOp($1,$me)){

#si no soy yo el que lo da!
if ("$Mynick"!="$3") {
	# proteccion mass-ban
	if ($config(%confi,Pantik)) {
   if ("$GetFlags($Mask(5,$3))"=="a" && "$GetFlags($Mask(9,$3))"=="a") {halt;}
   if ("%Onknicka"=="$3") {%Onkveces++;}
      else {%Onkveces=1;%Onknickvictima=;}
   if ("%Onknicka"=="$3" && %Onkveces>=$config(%confi,Onkvecesc)) { 
      castigo $config(%confi,c_masskick) $1 $3;
      echo -w=@console -i=6 Proteccion Mass KICK en $B$1$B ataque de: $B$3$B;
      }
   %Onknicka=$3;
   timer -s (onknicka,$config(%confi,Onktime)) {%Onknicka=;%Onkveces=1;}
   }
}
}
[ENDEVENT]
[EVENT OnMeKick ENABLED bytes 761]
echo -w=$console -i=62 $B $2 $B te hizo un Kick en $1 si le queres hablar por privado $B pulsa F8 $B
if ($option(bAutoRejoinOnKick)==1) echo -w=$console -i=62 Para detener el auto rejoin on kick $B pulsa F4 $B
%Kickquery=1
%Kickernick="$2"
ruido kick.wav
if ($option(bAutoRejoinOnKick)==1) {
timer -w=@console (rejoin$1,15000,$1) {
	if ($iswindow(*Reingreso_$timermagic)) join $timermagic
	if (!$iswindow(*Reingreso_$timermagic)) killtimer -q rejoin$timermagic
}
window *Reingreso_$1 open
window *Reingreso_$1 Timestamp off
say *Reingreso_$1 $B Intentando ingresar en $1 $B
say *Reingreso_$1 $K\12 Cerrar para cancelar
window *Reingreso_$1 input off
window *Reingreso_$1 caption Re Ingreso ...
window *Reingreso_$1 list off
window *Reingreso_$1 resize 300,200
}
[ENDEVENT]
[EVENT OnTopic ENABLED bytes 682]
#Se fija si el canal esta registrado
if($strFind(","$1",",$config(a,canales_conf))==-1) %confi="a"
else %confi="a_cfg_canal_"$1

#Si soy Op
if($isOp($1,$me)){

   if($config(%confi,ptopic)==1 && "$MyNick"!="$2"){
      if ($calc("$GetFlags($Mask(5,$2))"=="a" && "$GetFlags($Mask(9,$2))"=="a")) 
      {}
      else {
      castigo $config(%confi,c_masskick) $1 $2;
      topic $1 %Topicprotegido[$1]
      echo -w=@console -i=6 Proteccion de Topic! en el canal: $chan lo cambio: $2;
      ruido warning.wav;
      }
   }
}
if ("$topic($1)"=="[ Channel topic unknown (No TOPIC message received) ]" || "$topic($1)"=="") {
	%Topicprotegido[$1]=""
	}
else %Topicprotegido[$1]=$topic($1)
[ENDEVENT]
[EVENT OnInvite DISABLED bytes 0]

[ENDEVENT]
[EVENT OnCTCP DISABLED bytes 0]

[ENDEVENT]
[EVENT OnCTCPReply DISABLED bytes 0]

[ENDEVENT]
[EVENT OnCTCPFlood ENABLED bytes 304]
if ("$GetFlags($Mask(9,$1))"!="i") {
	ignore $Mask(9,$1)
	timer -s -w=@console (floodctcp%Num,90000,$Mask(9,$1)) {
		unregister $timermagic
		echo -w=@console -i=7 Se Deja de Ignorar a: $timermagic ...
		%Num++
		}
	echo -w=@console -i=7 Se ignora a: $B$1$B por 1 min 30 seg!
	ruido attack_detected.wav
}
[ENDEVENT]
[EVENT OnAction DISABLED bytes 0]

[ENDEVENT]
[EVENT OnOp ENABLED bytes 1497]
#Se fija si el canal esta registrado
if($strFind(","$1",",$config(a,canales_conf))==-1) %confi="a"
else %confi="a_cfg_canal_"$1

#genera echo
echo -i=23 -w=$1 $2 [$hostname($2)] pone el modo +o a: $4

#Si soy Op
if($isOp($1,$me)){

#si esta prendido el Sacar OP
if ($config(%confi,pop)) {
 #si yo doy el op,  si yo resivo el op, si es aliado, se anula
   if($calc("$2"=="$MyNick") || $calc("$4"=="$MyNick") || $calc("$GetFlags($Mask(5,$2))"=="a" && "$GetFlags($Mask(9,$2))"=="a"))
   {}
   else {
   deop $1 $2
   deop $1 $4
   ruido warning.wav
   echo -w=@console -i=6 Proteccion Anti OP en $B$1$B ataque de: $B$2$B
   }
}

# proteccion mass-op
if ($config(%confi,Pantiop)) {
   #si no soy yo el que lo da!
   if ("$Mynick"!="$2") {
	#si es aliado cancela
	if ("$GetFlags($Mask(5,$2))"=="a" || "$GetFlags($Mask(9,$2))"=="a") {halt;}

	if ("%Onopnicka"=="$2") {
		%Onopveces++
#		echo mismo nick que suma!
		}
      else {
#		echo entra nuevo nick
		%Onopveces=1
		%Onopnickvictima=;
		}
	if ("%Onopnicka"=="$2" && %Onopveces>=$config(%confi,Onopvecesc)) { 
#		echo Se activa la proteccion! victimasviejas: %Onopnickvictima
		castigo $config(%confi,c_massop) $1 $2;
		deop $1 %Onopnickvictima;
		deop $1 $4;
		echo -w=@console -i=6 Proteccion Mass OP en $B$1$B ataque de: $B$2$B;
	      }
	%Onopnicka=$2;
	%Onopnickvictima<,$4;
#	echo agrega y queda asi: nicks victimas: %Onopnickvictima
	timer -s (onopnicka,$config(%confi,Onoptime)) {%Onopnicka=;%Onopveces=1;%Onopnickvictima=;}
   }
}

}
halt;
[ENDEVENT]
[EVENT OnDeOp ENABLED bytes 1331]
echo -i=24 -w=$1 $2 [$hostname($2)] pone el modo -o a: $4
#Se fija si el canal esta registrado
if($strFind(","$1",",$config(a,canales_conf))==-1) %confi="a"
else %confi="a_cfg_canal_"$1

#Si soy Op
if($isOp($1,$me)){
#si no soy yo el que lo da!
if ("$Mynick"!="$2") {
# proteccion aliado deop
if ($config(%confi,aldeop)) {
   if ("$GetFlags($Mask(5,$4))"=="a" && "$GetFlags($Mask(9,$4))"=="a") {
      if ("$4"!="$2") {
         castigo $config(%confi,c_aldeop) $1 $2
         op $1 $4
         ruido warning.wav
         echo -w=@console -i=6 Proteccion DeOP Aliados en $B$1$B ataque de: $B$2$B;
         halt
	   }
      }
}

# proteccion mass-deop
if ($config(%confi,Pantideop)) {
   if ("$GetFlags($Mask(5,$2))"=="a" && "$GetFlags($Mask(9,$2))"=="a") {halt;}
   if ("%Ondeopnicka"=="$2") {%Ondeopveces++;}
      else {%Ondeopveces=1;%Ondeopnickvictima=;}
   if ("%Ondeopnicka"=="$2" && %Ondeopveces>=$config(%confi,Ondeopvecesc)) { 
      castigo $config(%confi,c_massdeop) $1 $2;
      op $1 %Ondeopnickvictima;
      op $1 $4;
      echo -w=@console -i=6 Proteccion Mass DeOP en $B$1$B ataque de: $B$2$B;
      }
   %Ondeopnicka=$2;
   %Ondeopnickvictima<,$4;
   timer -s (ondeopnicka,$config(%confi,Ondeoptime)) {%Ondeopnicka=;%Ondeopveces=1;%Ondeopnickvictima=;}
   }

#del no soy yo el que lo hace
}
#del si soy op
}

halt
[ENDEVENT]
[EVENT OnMeOp ENABLED bytes 3401]
echo -i=23 -w=$1 $2 [$hostname($2)] Te da OP!;
echo -i=23 -w=@console $2 [$hostname($2)] Te da OP en $1;

#Se fija si el canal esta registrado
if($strFind(","$1",",$config(a,canales_conf))==-1) %confi="a"
else %confi="a_cfg_canal_"$1

switch($config(%confi,Onopaccion)){
	#ninguna accion
    case(0): {

			}
	#mass deop
    case(1): {
				%tmp=$strReplace($oponchan($1),","$mynick,"")
				%tmp=$strReplace(%tmp,$mynick,"")
				if ("%tmp"!=""){
					deop $1 %tmp
				}
				echo -w=@console -i=6 Mass DEOP! en el canal: $1			
			}
	#mass kick op
    case(2): {
				%tmp=$strReplace($oponchan($1),","$mynick,"")
				%tmp=$strReplace(%tmp,$mynick,"")
				if ("%tmp"!=""){
					kick $1 %tmp
					}
				echo -w=@console -i=6 Mass KICK OP! en el canal: $1
			}
	#mass kick
    case(3): {
				%tmp=$strReplace($allonchan($1),","$mynick,"")
				%tmp=$strReplace(%tmp,$mynick,"")
				if ("%tmp"!=""){
					kick $1 %tmp
				}
				echo -w=@console -i=6 Mass KICK! en el canal: $1
			}
	#mass kick & ban OP
    case(4): {
				%tmp=$strReplace($oponchan($1),","$mynick,"")
				%tmp=$strReplace(%tmp,$mynick,"")
				if ("%tmp"!=""){
					foreach(%tmp2,%tmp) %bans<,$Mask(9,%tmp2)
					ban $1 %bans
					kick $1 %tmp
				}
				echo -w=@console -i=6 Mass KICK & Ban OP! en el canal: $1
			}
	#mass kick & ban	
    case(5): {
				%tmp=$strReplace($allonchan($1),","$mynick,"")
				%tmp=$strReplace(%tmp,$mynick,"")
				if ("%tmp"!=""){
					foreach(%tmp2,%tmp) %bans<,$Mask(9,%tmp2)
					ban $1 %bans
					kick $1 %tmp
				}
				echo -w=@console -i=6 Mass KICK & Ban! en el canal: $1
			}
	#Take Over
    case(6): {
				#massdeop
				%tmp=$strReplace($oponchan($1),","$mynick,"")
				%tmp=$strReplace(%tmp,$mynick,"")
				if ("%tmp"!=""){
					deop $1 %tmp
				}
				#kick  ban todos
				%tmp=$strReplace($allonchan($1),","$mynick,"")
				%tmp=$strReplace(%tmp,$mynick,"")
				if ("%tmp"!=""){
					foreach(%tmp2,%tmp) %bans<,$Mask(9,%tmp2)
					ban $1 %bans
					kick $1 %tmp
					}
				mode $1 +impt
				topic $1 "Canal Tomado !!!.............iNGENIO Script, Do the Job.!"

				echo -w=@console -i=6 TAKE OVER! en el canal: $1
			}
#termina el switch
}


if ($config(%confi,Accesoalcanal)){
   raw access $1 add host $MyNick"!*@"$hostname($Mynick)
   echo -w=@console -i=7 Se Creo Acceso HOST al Canal $1
   }

if ($config(%confi,msipa) && $calc("$2"!="$Mynick")) who $1

if ($config(%confi,revlis)) {
foreach(%tmp,$allonchan($1)) if ("%tmp"!="$MyNick") {
   if ($IsReg($Mask(5,%tmp)) || $IsReg($Mask(9,%tmp))) {
         if ("$GetFlags($Mask(5,%tmp))"=="k" || "$GetFlags($Mask(9,%tmp))"=="k") kick $1 %tmp
         if ("$GetFlags($Mask(5,%tmp))"=="b" || "$GetFlags($Mask(9,%tmp))"=="b") {
                  ban $1 $Mask(9,%tmp);
                  kick $1 %tmp;
                  }
         if ("$GetFlags($Mask(5,%tmp))"=="v" || "$GetFlags($Mask(9,%tmp))"=="v") voice $1 %tmp;
         if ("$GetFlags($Mask(5,%tmp))"=="a" && "$GetFlags($Mask(9,%tmp))"=="a") op $1 %tmp;
         #No conoce el IP
         if ("$GetFlags($Mask(5,%tmp))"!="" && "$GetFlags($Mask(9,%tmp))"=="" && "$GetFlags($Mask(5,%tmp))"!="a") {
                  %f=$GetFlags($Mask(5,%tmp)); 
                  register $Mask(0,%tmp) %f;
                  }
   }
}
}
if ("$topic($1)"=="[ Channel topic unknown (No TOPIC message received) ]" || "$topic($1)"=="") {
	%Topicprotegido[$1]=""
	}
else %Topicprotegido[$1]=$topic($1)

ruido opped.wav
halt
[ENDEVENT]
[EVENT OnMeDeop ENABLED bytes 128]
echo -i=24 -w=$1 $2 [$hostname($2)] Te saca OP
echo -i=24 -w=@console $2 [$hostname($2)] Te saca OP en $1
ruido deopped.wav
halt
[ENDEVENT]
[EVENT OnVoice ENABLED bytes 62]
echo -i=25 -w=$1 $2 [$hostname($2)] pone el modo +v a: $4
halt
[ENDEVENT]
[EVENT OnDevoice ENABLED bytes 62]
echo -i=26 -w=$1 $2 [$hostname($2)] pone el modo -v a: $4
halt
[ENDEVENT]
[EVENT OnMeVoice ENABLED bytes 108]
echo -i=25 -w=$1 $2 [$hostname($2)] Te da voz
echo -i=25 -w=@console $2 [$hostname($2)] Te da voz en $1
halt
[ENDEVENT]
[EVENT OnMeDevoice ENABLED bytes 112]
echo -i=26 -w=$1 $2 [$hostname($2)] Te saca voz
echo -i=26 -w=@console $2 [$hostname($2)] Te saca voz en $1
halt
[ENDEVENT]
[EVENT OnBan ENABLED bytes 903]
#Se fija si el canal esta registrado
if($strFind(","$1",",$config(a,canales_conf))==-1) %confi="a"
else %confi="a_cfg_canal_"$1

#Si soy Op
if($isOp($1,$me)){

#si no soy yo el que lo da!
if ("$Mynick"!="$2") {
	# proteccion mass-ban
	if ($config(%confi,Pantiban)) {
	#si es aliado cancela
     if ("$GetFlags($Mask(5,$2))"=="a" && "$GetFlags($Mask(9,$2))"=="a") {halt;}

     if ("%Onbannicka"=="$2") {%Onbanveces++;}
        else {%Onbanveces=1;%Onbannickvictima=;}
     if ("%Onbannicka"=="$2" && %Onbanveces>=$config(%confi,Onbanvecesc)) { 
        castigo $config(%confi,c_massban) $1 $2;
        unban $1 %Onbannickvictima;
        unban $1 $4;
        echo -w=@console -i=6 Proteccion Mass BAN en $B$1$B ataque de: $B$2$B;
        }
     %Onbannicka=$2;
     %Onbannickvictima<,$4;
     timer -s (onbannicka,$config(%confi,Onbantime)) {%Onbannicka=;%Onbanveces=1;%Onbannickvictima=;}
     }
  }
}
[ENDEVENT]
[EVENT OnUnban DISABLED bytes 0]

[ENDEVENT]
[EVENT OnMeBan ENABLED bytes 571]
if ($calc("$Mynick"=="$2")) {
	echo -i=27 -w=$1 $2 [$hostname($2)] Te Baneaste!
	halt
	}

echo -i=27 -w=$1 $2 [$hostname($2)] Te Baneo!
echo -i=27 -w=@console $2 [$hostname($2)] Te Baneo en $1

#Se fija si el canal esta registrado
if($strFind(","$1",",$config(a,canales_conf))==-1) %confi="a"
else %confi="a_cfg_canal_"$1

#Si soy Op
if($isOp($1,$me)){
	# proteccion mass-ban
	if ($config(%confi,banp)) {
	   castigo $config(%confi,c_antiban) $1 $2
	   unban $1 $4
	   ruido warning.wav
	   echo -w=@console -i=6 Proteccion ANTI BAN en $B$1$B ataque de: $B$2 $B
	}
}
halt
[ENDEVENT]
[EVENT OnMeUnban ENABLED bytes 215]
if ($calc("$Mynick"=="$2")) {
	echo -i=27 -w=$1 $2 [$hostname($2)] Te Sacaste el Ban!
	halt
	}
echo -i=27 -w=$1 $2 [$hostname($2)] Te Saca el Ban!
echo -i=27 -w=@console $2 [$hostname($2)] Te Saca el Ban en $1

halt
[ENDEVENT]
[EVENT OnBanException DISABLED bytes 0]

[ENDEVENT]
[EVENT OnBanExceptionRemove DISABLED bytes 0]

[ENDEVENT]
[EVENT OnMeBanException DISABLED bytes 0]

[ENDEVENT]
[EVENT OnMeBanExceptionRemove DISABLED bytes 0]

[ENDEVENT]
[EVENT OnChannelMode ENABLED bytes 766]
#Se fija si el canal esta registrado
if($strFind(","$1",",$config(a,canales_conf))==-1) %confi="a"
else %confi="a_cfg_canal_"$1

%gente=$strReplace($allonchan($1),$mynick,"");

#Si soy Op
if($isOp($1,$me)){
    # proteccion de modos
    if ($config(%confi,pmodos)) {
	    #si no soy yo el que lo da!
	    if ("$Mynick"!="$2" && "%gente"!="") {
	    if($calc("$2"=="$MyNick") || $calc("$GetFlags($Mask(5,$2))"=="a" && "$GetFlags($Mask(9,$2))"=="a"))
		    {}
	    else {
	       castigo $config(%confi,c_pmodos) $1 $2;
	       %modos=$4;
	       %modos=$strReplace(%modos,"-","0");
	       %modos=$strReplace(%modos,"+","1");
	       %modos=$strReplace(%modos,"0","+");
             %modos=$strReplace(%modos,"1","-");
		 mode $1 %modos; 
	       }
   	     }
    }
}
[ENDEVENT]
[EVENT OnChannelMessage ENABLED bytes 1145]
if ($strfind("$chan","$1")!=-1) {
echo -i=0 $O <$1> $3-
halt
}
#Juanjo Alvarez es el autor de los colores en los nicks
#gracias Juanjo!

%color = $StrLen($1)
if ("$config(a,colorfondo)"=="claro") {
	switch (%color) {
		case(15): %color++
		case(11): %color++
		case(8): {
			%color++;
			%color++;
			}
		case(9): %color++
	}
}
if ("$config(a,colorfondo)"=="oscuro") {
	switch (%color) {
		case(1): %color+=2;
		case(17): %color+=2;
		case(2): %color+=2;
		case(18): %color+=2;
		case(5): %color+=2;
		case(21): %color+=2;
		case(6): %color+=2;
		case(22): %color+=2;
		case(14): %color+=2;
		}
}
if ($strfind($mynick,$3-)!=-1) {
	echo -w=@console -i=6 $B$cr![dbl]query $1[rbt]builtin_nick_popup $1$cr$1$cr$B Te nombro en $chan !!! [$3-]
	if ("$config(a,s_san)"!="") {
		ruido san.wav
		}
	if ($config(a,nickcolor)) echo -i = 48 $B$K%color<$cr![dbl]query $1[rbt]builtin_nick_popup $1$cr$1$cr>$O $3-
	else echo -i = 48 $B<$cr![dbl]query $1[rbt]builtin_nick_popup $1$cr$1$cr>$O $3-
	halt
}
if ($config(a,nickcolor)) {
#	echo -i = 89 $B$K%color<$1>$O $3-;
	echo -i = 0 $B$K%color<$cr![dbl]query $1[rbt]builtin_nick_popup $1$cr$1$cr>$O $3-;
	halt;
}
[ENDEVENT]
[EVENT OnMePrivateMessage ENABLED bytes 701]
%mensaje=$3-

if ($strFind($1,$allQueries)==-1) {
	# proteccion mass-query
	%cant=0
	foreach(%t,$allQueries) %cant++
	if (%cant>=$config(a,mquery)) {
		#echo -i=6 -w=@console Proteccion Mass Query! $B"Nick:"$B $1 $B"Msg:"$B $3-
		halt
	}
}

#anti-query-spam
%pu1=$strFind("http",%mensaje)
%pu2=$strFind("www",%mensaje)
%pu3=$strFind("spam",%mensaje)
%pu4=$strFind(".to",%mensaje)
%pu5=$strFind("#",%mensaje)
%pu6=$strFind("w w w",%mensaje)
%pu7=$strFind(".com",%mensaje)
if (%pu1!=-1 || %pu2!=-1 || %pu3!=-1 || %pu4!=-1 || %pu5!=-1 || %pu6!=-1 || %pu7!=-1) {
   if ($strFind($1,$AllQueries)==-1) {
      echo -i=41 -w=@console $O"Spam de: "$B$1 "-> " $B$3-
      halt
      }
   }
ruido snd_query.wav;
[ENDEVENT]
[EVENT OnServerNotice DISABLED bytes 0]

[ENDEVENT]
[EVENT OnChannelNotice DISABLED bytes 0]

[ENDEVENT]
[EVENT OnMeNotice ENABLED bytes 902]
if ("$1"=="$mynick" && "$3-"=="lag") {
#	echo el lag es de: $DurationToString($calc($times-%Lag))
	if (%Away) %laguito="-- Lag: "$calc($times-%Lag)" Seg -- Estas AWAY"
	else %laguito="-- Lag: "$calc($times-%Lag)" Seg"
	%texto=" -- iNGENIO ScripT "$config(a,sver)
      option szCaptionMessage %texto %laguito
	halt
	}

#�nt�Sp�m
%mensaje=$3-
%pu0=$strFind("script",%mensaje)
%pu1=$strFind("http",%mensaje)
%pu2=$strFind("www",%mensaje)
%pu3=$strFind("spam",%mensaje)
%pu4=$strFind(".to",%mensaje)
%pu5=$strFind("#",%mensaje)
%pu6=$strFind("�",%mensaje)
if (%pu0!=-1 || %pu1!=-1 || %pu2!=-1 || %pu3!=-1 || %pu4!=-1 || %pu5!=-1 || %pu6!=-1 || %Antipubli==1) {
   if (%Antipublim>0) {
         NOTICE -s $1 $K\0,3$B[Anti Publicidad]!!! $B$K\1,11 $K\1,2 $K\0,12 $B iNGENI{} ScripT $config(a,sver) $B  $K\1,2 $K\1,11 $O http://move.to/ingenio
         %Antipublim=-1
         }
   %Antipublim++
   halt
   }
[ENDEVENT]
[EVENT OnNotify DISABLED bytes 0]

[ENDEVENT]
[EVENT OnInviteException DISABLED bytes 0]

[ENDEVENT]
[EVENT OnInviteExceptionRemove DISABLED bytes 0]

[ENDEVENT]
[EVENT OnMeInviteException DISABLED bytes 0]

[ENDEVENT]
[EVENT OnMeInviteExceptionRemove DISABLED bytes 0]

[ENDEVENT]
[EVENT OnConsoleInput ENABLED bytes 35]
if ($IsConnected && %Away) {
back
}
[ENDEVENT]
[EVENT OnChannelInput ENABLED bytes 1089]
if ($IsConnected && %Away) {
	back
}

if ($config(a,adornanicks)) {

	%sw=0
	foreach(%t, $allonchan($chan)) {
		if("%t"=="$2") {		
			switch($config(a, tipoAdorno)) {
				case(0): {
					%tipomarcoizq    = "["
					%tipomarcodcha = "]"
				}
				case(1): {
					%tipomarcoizq    = "->"
					%tipomarcodcha = "<-"		
				}
				case(2): {
					%tipomarcoizq    = "<({["
					%tipomarcodcha = "]})>"	
				}
			}

			If ($config(a,formatocanalActivo)) {
				if($Config(a,formatocanalnegrita)) %negrita="$B"
				if($Config(a,formatocanalsubrayado)) %subrayado="$U"
				msg $1 $K$Config(a,formatocanalcolor)\,$Config(a,formatocanalfondo)%tipomarcoizqda%negrita%subrayado%tipomarcodcha$B$B$2-
				halt;
			}	
			else {
				msg $1 $B$K\4%tipoMarcoizq$K\12$2$K\4%tipoMarcodcha$O $3-
			}
			%sw=1
			break;
		}
	}
	if (%sw)halt
}

else {
	If ($config(a,formatocanalActivo)) {
		if($Config(a,formatocanalnegrita)) %negrita="$B"
		if($Config(a,formatocanalsubrayado)) %subrayado="$U"
		msg $1 $K$Config(a,formatocanalcolor)\,$Config(a,formatocanalfondo)%negrita%subrayado$B$B$2-
		halt;
	}	
	else {}
}
[ENDEVENT]
[EVENT OnQueryInput ENABLED bytes 288]
if ($IsConnected && %Away) {
back
}
If ($config(a,formatoQueryActivo)) {
	if($Config(a,formatoQuerynegrita)) %negrita="$B"
	if($Config(a,formatoQuerysubrayado)) %subrayado="$U"
	msg $1 $K$Config(a,formatoQuerycolor)\,$Config(a,formatoQueryfondo)%negrita%subrayado$B$B$2-
	halt;
	}
else {}
[ENDEVENT]
[EVENT OnDCCInput DISABLED bytes 0]

[ENDEVENT]
[EVENT OnUnhandledLiteral DISABLED bytes 0]

[ENDEVENT]
[EVENT OnUnhandledNumeric ENABLED bytes 17]
if ($2==555) halt
[ENDEVENT]
[EVENT OnKeyShortcut ENABLED bytes 996]
switch($1){
	case("F4"): {
			if ($option(bAutoRejoinOnKick)==1) {
			option bAutoRejoinOnKick 0
			echo -i=1 -w=@console Auto rejoin On Kick$B OFF
			halt
			}
			if ($option(bAutoRejoinOnKick)==0) {
			option bAutoRejoinOnKick 1
			echo -i=1 -w=@console Auto rejoin On Kick$B ON
			}
			halt
		    }
	case("F3"): {
			dialog(lineinput,"Buscar...","Ingrese el texto que desea buscar en la ventana activa","%Buscartexto") if ("$dialogresult"!="") {
				%Buscartexto=$dialogresult
				findtext -p $dialogresult
			}
			halt;
		}
	case("F7"): {
			if ("%Unmask"!=""){ul;echo -i=5 -w=*ul Detenido por el Usuario;}
 			%Unmasknick=;		
			%Unmaskwho=;
			%Unmaske=;
			%Unmaskl=;
			%Unmask=;
			%Unmaskav=;
			%Unmaskci=;
			%Unmaskstring=;
			%Unmasktam=;
			%Unmaskfin=;
			%Unmaskn=;
			%Unmaskip=;
			 }
	case("F8"): {
				  if (%Kickquery){
		 		  query %Kickernick
				   }
                     }
	case("F12"): {
				foreach(%canal,$config(a,autoentrar)){
					join %canal
					}
				}      

}
[ENDEVENT]
[EVENT OnNickDoubleClicked DISABLED bytes 0]

[ENDEVENT]
[EVENT OnUserWindowInput DISABLED bytes 0]

[ENDEVENT]
[EVENT OnUserWindowFileDrop DISABLED bytes 0]

[ENDEVENT]
[EVENT OnUserWindowSelected DISABLED bytes 0]

[ENDEVENT]
[EVENT OnWhoisReply DISABLED bytes 0]

[ENDEVENT]
[EVENT OnDccChatMessage DISABLED bytes 0]

[ENDEVENT]
[EVENT OnDccChatConnected DISABLED bytes 0]

[ENDEVENT]
[EVENT OnDccChatTerminated DISABLED bytes 0]

[ENDEVENT]
[EVENT OnDccGetTransferComplete ENABLED bytes 106]
echo -i =50 -w=@console $K\9,9.$K\0,14 $K\0,3 Se Recivio un Archivo de $B$1$B ($4) $K\1,3 $K\1,14 $K\9,9.;
[ENDEVENT]
[EVENT OnDccSendTransferComplete ENABLED bytes 103]
echo -i =50 -w=@console $K\9,9.$K\0,14 $K\0,3 Se Envio un Archivo a $B$1$B ($4) $K\1,3 $K\1,14 $K\9,9.;
[ENDEVENT]
[EVENT OnCtcpMultimedia DISABLED bytes 0]

[ENDEVENT]
[EVENT OnWallops DISABLED bytes 0]

[ENDEVENT]
[EVENT OnChannelOpNotice DISABLED bytes 0]

[ENDEVENT]
[EVENT OnUrl DISABLED bytes 0]

[ENDEVENT]
[EVENT OnNick DISABLED bytes 0]

[ENDEVENT]
[EVENT OnMeNick ENABLED bytes 103]
If (%Actualizanick!=1) {
option szNickName1 $3
option szNickName2 $1
if (%Away) back
}
%Actualizanick=0
[ENDEVENT]
[EVENT OnError DISABLED bytes 0]

[ENDEVENT]
[EVENT OnEventError DISABLED bytes 0]

[ENDEVENT]
[EVENT OnQuit DISABLED bytes 0]

[ENDEVENT]
[EVENT OnIdleStart ENABLED bytes 101]
if ($IsConnected && %Away!=1 && $config(a,autoaway)) {
away
echo -w=@console AUTO Away... Activado!
}
[ENDEVENT]
[EVENT OnIdleStop ENABLED bytes 35]
if ($IsConnected && %Away) {
back
}
[ENDEVENT]
