xD
::::::::::::::::::::::::::::
:::::: Coded By eNkIL ::::::
::::::::::::::::::::::::::::
::: Cambiale si sabes =) :::
::::::::::::::::::::::::::::
; english version
;Autojoin
on 1:connect:{
;AutoJoin
if (%mostrar.ajoin) { ajoin }
if (%ajoin) {
var %x = 1
while ( %x <= $lines($mircdirscripts/ajoin.txt)) {
join $read($mircdirscripts/ajoin.txt,%x)
inc %x
}
}
}
menu menubar,channel,status {
Auto Join:ajoin
-
}
alias ajoin {
if ($dialog(ajoin) == $null) { dialog -m ajoin ajoin }
else { .echo -a -Opening Auto Join Dialog.. }
}
dialog ajoin {
title "[AS2010] Auto Join"
size -1 -1 150 87
option dbu
box "Auto Join List", 1, 1 0 55 85
list 2, 3 8 50 75
box "Configurations", 3, 57 0 92 85
edit "", 4, 59 8 60 10
check "Active", 5, 121 8 25 10
button "<Add", 6, 59 19 42 10
button "Join", 7, 105 19 42 10
button "Delete", 8, 59 31 42 10
check "Show on Conect", 9, 75 43 60 10
button "Close", 10, 59 55 89 10, ok
text "-[e N k I L S c r i p t 2 0 1 1]-", 11, 65 72 89 10, disable
}
;Alias Ajoin
alias carga.ajoin {
var %x = 1
while ( %x <= $lines($mircdirscripts/ajoin.txt)) {
did -a ajoin 2 $read($mircdirscripts/ajoin.txt,%x)
inc %x
}
if (%ajoin) did -c ajoin 5
if (%mostrar.ajoin) did -c ajoin 9
}
alias canal.nuevo {
if (!$did(ajoin,4).text) {
noop $input(Type a Channel.,uwo,[-] Error!)
}
elseif ($left($did(4).text,1) != $chr(35)) {
noop $input(Plese use (#) Example: #channel.,uwo,[-] Error!)
did -r ajoin 4
}
elseif ($did(ajoin,4).text) {
var %najoin $read($mircdirscripts/ajoin.txt,w,$did(ajoin,4).text)
if (%najoin == $did(ajoin,4).text) {
noop $input(This Channel allready Exist!.,uwo,[-] Error!)
did -r ajoin 4
}
else {
.write $mircdirscripts/ajoin.txt $did(4).text
did -r ajoin 2,4
var %x = 1
while ( %x <= $lines($mircdirscripts/ajoin.txt)) {
did -a ajoin 2 $read($mircdirscripts/ajoin.txt,%x)
inc %x
}
}
}
}
alias borra.canal {
if (!$did(ajoin,4).text) && (!$did(ajoin,2).seltext) {
noop $input(You did not select or type any channel.,uwo,[-] Error!)
}
elseif ($left($did(ajoin,4).text,1) != $chr(35)) && (!$did(2).seltext) {
noop $input(Plese use (#) Example: #channel.,uwo,[-] Error!)
did -r ajoin 4
}
elseif ($did(ajoin,4).text) && (!$did(ajoin,2).seltext) {
var %dajoin $read($mircdirscripts/ajoin.txt,w,$did(ajoin,4).text)
if (%dajoin != $did(ajoin,4).text) {
$input(This channel is not on the list.,ouw,[-] Error!)
did -r ajoin 4
}
elseif ($did(ajoin,4).text) && (!$did(ajoin,2).seltext) {
var %dajoin $read($mircdirscripts/ajoin.txt,w,$did(ajoin,4).text)
if (%dajoin == $did(ajoin,4).text) {
write -dl [ $+ [ $readn ] ] $mircdirscripts/ajoin.txt
did -r ajoin 4,2
var %x = 1
while ( %x <= $lines($mircdirscripts/ajoin.txt)) {
did -a ajoin 2 $read($mircdirscripts/ajoin.txt,%x)
inc %x
}
}
}
}
elseif ($did(ajoin,2).seltext) && (!$did(ajoin,4).text) {
var %dajoin $read($mircdirscripts/ajoin.txt,w,$did(ajoin,2).seltext)
if (%dajoin == $did(ajoin,2).seltext) {
write -dl [ $+ [ $readn ] ] $mircdirscripts/ajoin.txt
did -r ajoin 2
var %x = 1
while ( %x <= $lines($mircdirscripts/ajoin.txt)) {
did -a ajoin 2 $read($mircdirscripts/ajoin.txt,%x)
inc %x
}
}
}
}
;Eventos Dialogo
on *:dialog:ajoin:*:*: {
if ($devent == init) {
if ($did = 0) { carga.ajoin }
}
if ($devent == sclick) {
if ($did = 5) { set %ajoin $did($dname,5).state }
if ($did = 6) { canal.nuevo }
if ($did = 7) {
if ($left($did(4).text,1) != $chr(35)) {
noop $input(Plese use (#) Example: #channel.,uwo,[-] Error!)
}
else {
.join $did($dname,4).text
}
}
if ($did = 8) { borra.canal }
if ($did = 9) { set %mostrar.ajoin $did($dname,9).state }
}
if ($devent == dclick) {
if ($did = 2) { .join $did($dname,2).seltext }
}
}