Just an auto Join for a server.
dialog Ajoin {
title "Auto Join"
size -1 -1 87 52
option dbu
button "Add", 2, 64 2 22 9
button "Rem", 3, 64 11 22 9
check "Enable", 4, 64 29 22 9, push
button "Clear", 5, 64 20 22 9
list 1, 1 1 62 50, size
button "Done", 6, 64 42 22 9, ok cancel
}
on *:dialog:Ajoin:sclick:2: {
var %a = $input(Enter Channel,1,Auto Join)
var %b = $input(Enter Key (No if there isn't one),9,Auto Join)
did -a $dname 1 %a %b
write $c.dir(System,Ajoin.txt) %a %b
}
on *:dialog:Ajoin:sclick:3: {
did -d $dname 1 $did(1).sel
write -dl $+ $did(1).sel $c.dir(System,Ajoin.txt)
}
on *:dialog:ajoin:sclick:5: {
write -c $c.dir(System,Ajoin.txt)
did -r $dname 1
}
on *:dialog:ajoin:sclick:4: {
if ($did(4).state == 1) {
hadd Settings Ajoin on
did -e $dname 1,2,3,5
}
else {
hadd Settings Ajoin off
did -rb $dname 1
did -b $dname 2,3,5
write -c $c.dir(System,ajoin.txt)
}
hsave -o Settings $c.dir(System,remotes,hashtable.txt)
}
on *:dialog:ajoin:init:0: {
if ($hget(Settings,Ajoin) == on) && ($isfile($c.dir(System,ajoin.txt))) { loadbuf -ro $dname 1 $c.dir(System,ajoin.txt) | did -c $dname 4 }
else {
did -b $dname 1,2,3,5
}
}
Two things, one where is the part that auto joins and two you should probably remove parts if they aren't included. Like the $cdir you should either include that custom identifier or remove it and edit the script so people can use it without editing it themselves. I personally feel scripts should work out of the box, especially if they are being publicly posted.