its an autojoin simple to use =D
on *:CONNECT: { if (%aj = on) join %chans
}
menu * {
.Auto Join:dialog -m autoj autoj
}
dialog autoj {
title "Auto Join"
size -1 -1 205 155
option pixels
list 1, 5 5 95 120, size vsbar
button "Add Chan" 2, 110 5 85 20
button "Del Chan" 3, 110 30 85 20
button "Enable" 4, 110 55 85 20
button "Disable" 5, 110 80 85 20
button "Part" 7, 110 105 85 20, disable
button "Join" 6, 110 130 85 20, disable
edit "" 8, 5 130 95 20, read autohs
}
on *:DIALOG:autoj:init:0:{
var %bo = $numtok(%chans,44), %ae = 1
while ( %ae <= %bo ) {
did -a $dname 1 $gettok(%chans,%ae,44)
inc %ae }
did -a $dname 8 status: %aj
}
on *:DIALOG:autoj:sclick:*:{
if ($did = 1) { did -e $dname 6,7 }
if ($did = 6) { join $did($dname,1).seltext }
if ($did = 7) { part $did($dname,1).seltext }
if ($did = 4) { set %aj on | did -ra $dname 8 status: %aj }
if ($did = 5) { set %aj off | did -ra $dname 8 status: %aj }
if ($did = 2) { set %chanes $?="what channel would you like to add to autojoin?" | set %chans $addtok(%chans,%chanes,44) | did -a autoj 1 %chanes }
if ($did = 3) {
set %chans $remtok(%chans,$?="which channel would you like to del from autojoin?",44)
did -r autoj 1
var %bo = $numtok(%chans,44), %ae = 1
while ( %ae <= %bo ) {
did -a $dname 1 $gettok(%chans,%ae,44) }
}
You can combine the commands
did -e $dname 6 | did -e $dname 7
as
did -e $dname 6,7
You also have an extra { in the $did = 2 line, which offsets, and therefore prevents the $did = 3 section from working, as $did would have to match both 2 and 3 for that to work, which is both adding and deleting a channel