
on *:load:{
  set %enterchan on
  echo -a * Autojoin caricato con successo.
}

alias autojoin { /dialog -m hy.join hy.join }

dialog hy.join {
  title "Autojoin Angel_Red_Script"
  size -1 -1 500 500
  tab "Autojoin 1", 1, 10 10 480 450
  tab "Autojoin 2", 200
  box "Autojoin server 1", 2, 15 40 470 400, tab 1
  text "Canali dove entrare alla connessione", 3, 42 90 300 20, tab 1
  text "a = Abilita", 4, 410 70 60 20, tab 1
  edit "", 38, 380 65 20 20, tab 1
  text "1", 5, 20 118 15 20, tab 1
  edit "", 6, 42 115 190 20, autohs, tab 1
  text "Psw", 99, 242 118 25 20, tab 1
  edit "", 100, 270 115 180 20, autohs, tab 1
  text "2", 7, 20 138 15 20, tab 1
  edit "", 8, 42 135 190 20, autohs, tab 1
  text "Psw", 101, 242 138 25 20, tab 1
  edit "", 102, 270 135 180 20, autohs, tab 1
  text "3", 9, 20 158 15 20, tab 1
  edit "", 10, 42 155 190 20, autohs, tab 1
  text "Psw", 103, 242 158 25 20, tab 1
  edit "", 104, 270 155 180 20, autohs, tab 1
  text "4", 11, 20 178 15 20, tab 1
  edit "", 12, 42 175 190 20, autohs, tab 1
  text "Psw", 105, 242 178 25 20, tab 1
  edit "", 106, 270 175 180 20, autohs, tab 1
  text "5", 13, 20 198 20 20, tab 1
  edit "", 14, 42 195 190 20, autohs, tab 1
  text "Psw", 107, 242 198 25 20 tab1
  edit "", 108, 270 195 180 20, autohs, tab 1
  text "6", 15, 20 218 15 20, tab 1
  edit "", 16, 42 215 190 20, autohs, tab 1
  text "Psw", 109, 242 218 25 20, tab 1
  edit "", 110, 270 215 180 20, autohs, tab 1
  text "7", 17, 20 238 15 20, tab 1
  edit "", 18, 42 235 190 20, autohs, tab 1
  text "Psw", 111, 242 238 25 20, tab 1
  edit "", 112, 270 235 180 20, autohs, tab 1
  text "8", 19, 20 258 15 20, tab 1
  edit "", 20, 42 255 190 20, autohs, tab 1
  text "Psw", 113, 242 258 25 20, tab 1
  edit "", 114, 270 255 180 20, autohs, tab 1
  text "9", 21, 20 278 15 20, tab 1
  edit "", 22, 42 275 190 20, autohs, tab 1
  text "Psw", 115, 242 278 25 20, tab 1
  edit "", 116, 270 275 180 20, autohs, tab 1
  text "10", 23, 20 298 15 25, tab 1
  edit "", 24, 42 295 190 20, autohs, tab 1
  text "Psw", 117, 242 298 25 20, tab 1
  edit "", 118, 270 295 180 20, autohs, tab 1
  text "11", 25, 20 318 15 25, tab 1
  edit "", 26, 42 315 190 20, autohs, tab 1
  text "Psw", 119, 242 318 25 20, tab 1
  edit "", 120, 270 315 180 20, autohs, tab 1
  text "12", 27, 20 338 15 25, tab 1
  edit "", 28, 42 335 190 20, autohs, tab 1
  text "Psw", 121, 242 338 25 20, tab 1
  edit "", 122, 270 335 180 20, autohs, tab 1
  text "13", 29, 20 358 15 25, tab 1
  edit "", 30, 42 355 190 20, autohs, tab 1
  text "Psw", 123, 242 358 25 20, tab 1
  edit "", 124, 270 355 180 20, autohs, tab 1
  text "14", 31, 20 378 15 25, tab 1
  edit "", 32, 42 375 190 20, autohs, tab 1
  text "Psw", 125, 242 378 25 20, tab 1
  edit "", 126, 270 375 180 20, autohs, tab 1
  text "15", 33, 20 398 15 25, tab 1
  edit "", 34, 42 395 190 20, autohs, tab 1
  text "Psw", 127, 242 398 25 20, tab 1
  edit "", 128, 270 395 180 20, autohs, tab 1
  edit %serverjoin , 802, 332 415 140 20 ,  autohs, tab 1
  text "Server :", 803, 272 418 55 20,  tab 1
  button "&OK", 40, 30 465 65 30, ok default
  button "&Cancella", 41, 115 465 65 30, cancel
  button "&Applica", 42, 200 465 65 30

  box "Autojoin server 2", 43, 15 40 470 400, tab 200
  text "Canali dove entrare alla connessione", 44, 42 90 300 20, tab 200
  text "1", 46, 20 118 15 20, tab 200
  edit "", 47, 42 115 190 20, autohs, tab 200
  text "Psw", 129, 242 118 25 20, tab 200
  edit "", 130, 270 115 180 20, autohs, tab 200
  text "2", 48, 20 138 15 20, tab 200
  edit "", 49, 42 135 190 20, autohs, tab 200
  text "Psw", 131, 242 138 25 20, tab 200
  edit "", 132, 270 135 180 20, autohs, tab 200
  text "3", 50, 20 158 15 20, tab 200
  edit "", 51, 42 155 190 20, autohs, tab 200
  text "Psw", 133, 242 158 25 20, tab 200
  edit "", 134, 270 155 180 20, autohs, tab 200
  text "4", 52, 20 178 15 20, tab 200
  edit "", 53, 42 175 190 20, autohs, tab 200
  text "Psw", 135, 242 178 25 20, tab 200
  edit "", 136, 270 175 180 20, autohs, tab 200
  text "5", 54, 20 198 20 20, tab 200
  edit "", 55, 42 195 190 20, autohs, tab 200
  text "Psw", 137, 242 198 25 20 tab 200
  edit "", 138, 270 195 180 20, autohs, tab 200
  text "6", 56, 20 218 15 20, tab 200
  edit "", 57, 42 215 190 20, autohs, tab 200
  text "Psw", 139, 242 218 25 20, tab 200
  edit "", 140, 270 215 180 20, autohs, tab 200
  text "7", 58, 20 238 15 20, tab 200
  edit "", 59, 42 235 190 20, autohs, tab 200
  text "Psw", 141, 242 238 25 20, tab 200
  edit "", 142, 270 235 180 20, autohs, tab 200
  text "8", 60, 20 258 15 20, tab 200
  edit "", 61, 42 255 190 20, autohs, tab 200
  text "Psw", 143, 242 258 25 20, tab 200
  edit "", 144, 270 255 180 20, autohs, tab 200
  text "9", 62, 20 278 15 20, tab 200
  edit "", 63, 42 275 190 20, autohs, tab 200
  text "Psw", 145, 242 278 25 20, tab 200
  edit "", 146, 270 275 180 20, autohs, tab 200
  text "10", 64, 20 298 15 25, tab 200
  edit "", 65, 42 295 190 20, autohs, tab 200
  text "Psw", 147, 242 298 25 20, tab 200
  edit "", 148, 270 295 180 20, autohs, tab 200
  text "11", 66, 20 318 15 25, tab 200
  edit "", 67, 42 315 190 20, autohs, tab 200
  text "Psw", 149, 242 318 25 20, tab 200
  edit "", 150, 270 315 180 20, autohs, tab 200
  text "12", 68, 20 338 15 25, tab 200
  edit "", 69, 42 335 190 20, autohs, tab 200
  text "Psw", 151, 242 338 25 20, tab 200
  edit "", 152, 270 335 180 20, autohs, tab 200
  text "13", 70, 20 358 15 25, tab 200
  edit "", 71, 42 355 190 20, autohs, tab 200
  text "Psw", 153, 242 358 25 20, tab 200
  edit "", 154, 270 355 180 20, autohs, tab 200
  text "14", 72, 20 378 15 25, tab 200
  edit "", 73, 42 375 190 20, autohs, tab 200
  text "Psw", 155, 242 378 25 20, tab 200
  edit "", 156, 270 375 180 20, autohs, tab 200
  text "15", 74, 20 398 15 25, tab 200
  edit "", 75, 42 395 190 20, autohs, tab 200
  text "Psw", 157, 242 398 25 20, tab 200
  edit "", 158, 270 395 180 20, autohs, tab 200
  edit %serverjoinb , 804, 332 415 140 20 ,  autohs, tab 200
  text "Server :", 805, 272 418 55 20,  tab 200
}


on *:dialog:hy.join:init:0: {
  did -a hy.join 6 %chan1 
  did -a hy.join 8 %chan2
  did -a hy.join 10 %chan3
  did -a hy.join 12 %chan4
  did -a hy.join 14 %chan5
  did -a hy.join 16 %chan6
  did -a hy.join 18 %chan7
  did -a hy.join 20 %chan8
  did -a hy.join 22 %chan9
  did -a hy.join 24 %chan10 
  did -a hy.join 26 %chan11
  did -a hy.join 28 %chan12
  did -a hy.join 30 %chan13
  did -a hy.join 32 %chan14
  did -a hy.join 34 %chan15
  did -a hy.join 38 %attivo 
  did -a hy.join 100 %cpass1 
  did -a hy.join 102 %cpass2
  did -a hy.join 104 %cpass3
  did -a hy.join 106 %cpass4
  did -a hy.join 108 %cpass5
  did -a hy.join 110 %cpass6
  did -a hy.join 112 %cpass7
  did -a hy.join 114 %cpass8
  did -a hy.join 116 %cpass9
  did -a hy.join 118 %cpass10 
  did -a hy.join 120 %cpass11
  did -a hy.join 122 %cpass12
  did -a hy.join 124 %cpass13
  did -a hy.join 126 %cpass14
  did -a hy.join 128 %cpass15
  did -a hy.join 47 %chan1b 
  did -a hy.join 49 %chan2b
  did -a hy.join 51 %chan3b
  did -a hy.join 53 %chan4b
  did -a hy.join 55 %chan5b
  did -a hy.join 57 %chan6b
  did -a hy.join 59 %chan7b
  did -a hy.join 61 %chan8b
  did -a hy.join 63 %chan9b
  did -a hy.join 65 %chan10b 
  did -a hy.join 67 %chan11b
  did -a hy.join 69 %chan12b
  did -a hy.join 71 %chan13b
  did -a hy.join 73 %chan14b
  did -a hy.join 75 %chan15b
  did -a hy.join 130 %cpass1b 
  did -a hy.join 132 %cpass2b
  did -a hy.join 134 %cpass3b
  did -a hy.join 136 %cpass4b
  did -a hy.join 138 %cpass5b
  did -a hy.join 140 %cpass6b
  did -a hy.join 142 %cpass7b
  did -a hy.join 144 %cpass8b
  did -a hy.join 146 %cpass9b
  did -a hy.join 148 %cpass10b 
  did -a hy.join 150 %cpass11b
  did -a hy.join 152 %cpass12b
  did -a hy.join 154 %cpass13b
  did -a hy.join 156 %cpass14b
  did -a hy.join 158 %cpass15b

}

on *:dialog:hy.join:sclick:40:{
  set %chan1 $did(hy.join,6)
  set %chan2 $did(hy.join,8)
  set %chan3 $did(hy.join,10)
  set %chan4 $did(hy.join,12)
  set %chan5 $did(hy.join,14)
  set %chan6 $did(hy.join,16)
  set %chan7 $did(hy.join,18)
  set %chan8 $did(hy.join,20)
  set %chan9 $did(hy.join,22)
  set %chan10 $did(hy.join,24)
  set %chan11 $did(hy.join,26)
  set %chan12 $did(hy.join,28)
  set %chan13 $did(hy.join,30)
  set %chan14 $did(hy.join,32)
  set %chan15 $did(hy.join,34)
  set %serverjoin $did(hy.join,802)
  set %cpass1 $did(hy.join,100)
  set %cpass2 $did(hy.join,102)
  set %cpass3 $did(hy.join,104)
  set %cpass4 $did(hy.join,106)
  set %cpass5 $did(hy.join,108)
  set %cpass6 $did(hy.join,110)
  set %cpass7 $did(hy.join,112)
  set %cpass8 $did(hy.join,114)
  set %cpass9 $did(hy.join,116)
  set %cpass10 $did(hy.join,118)
  set %cpass11 $did(hy.join,120)
  set %cpass12 $did(hy.join,122)
  set %cpass13 $did(hy.join,124)
  set %cpass14 $did(hy.join,126)
  set %cpass15 $did(hy.join,128)
  set %attivo $did(hy.join,38)
  set %chan1b $did(hy.join,47)
  set %chan2b $did(hy.join,49)
  set %chan3b $did(hy.join,51)
  set %chan4b $did(hy.join,53)
  set %chan5b $did(hy.join,55)
  set %chan6b $did(hy.join,57)
  set %chan7b $did(hy.join,59)
  set %chan8b $did(hy.join,61)
  set %chan9b $did(hy.join,63)
  set %chan10b $did(hy.join,65)
  set %chan11b $did(hy.join,67)
  set %chan12b $did(hy.join,69)
  set %chan13b $did(hy.join,71)
  set %chan14b $did(hy.join,73)
  set %chan15b $did(hy.join,75)
  set %serverjoinb $did(hy.join,804)
  set %cpass1b $did(hy.join,130)
  set %cpass2b $did(hy.join,132)
  set %cpass3b $did(hy.join,134)
  set %cpass4b $did(hy.join,136)
  set %cpass5b $did(hy.join,138)
  set %cpass6b $did(hy.join,140)
  set %cpass7b $did(hy.join,142)
  set %cpass8b $did(hy.join,144)
  set %cpass9b $did(hy.join,146)
  set %cpass10b $did(hy.join,148)
  set %cpass11b $did(hy.join,150)
  set %cpass12b $did(hy.join,152)
  set %cpass13b $did(hy.join,154)
  set %cpass14b $did(hy.join,156)
  set %cpass15b $did(hy.join,158)

}

on *:dialog:hy.join:sclick:42:{
  set %chan1 $did(hy.join,6)
  set %chan2 $did(hy.join,8)
  set %chan3 $did(hy.join,10)
  set %chan4 $did(hy.join,12)
  set %chan5 $did(hy.join,14)
  set %chan6 $did(hy.join,16)
  set %chan7 $did(hy.join,18)
  set %chan8 $did(hy.join,20)
  set %chan9 $did(hy.join,22)
  set %chan10 $did(hy.join,24)
  set %chan11 $did(hy.join,26)
  set %chan12 $did(hy.join,28)
  set %chan13 $did(hy.join,30)
  set %chan14 $did(hy.join,32)
  set %chan15 $did(hy.join,34)
  set %serverjoin $did(hy.join,802)
  set %cpass1 $did(hy.join,100)
  set %cpass2 $did(hy.join,102)
  set %cpass3 $did(hy.join,104)
  set %cpass4 $did(hy.join,106)
  set %cpass5 $did(hy.join,108)
  set %cpass6 $did(hy.join,110)
  set %cpass7 $did(hy.join,112)
  set %cpass8 $did(hy.join,114)
  set %cpass9 $did(hy.join,116)
  set %cpass10 $did(hy.join,118)
  set %cpass11 $did(hy.join,120)
  set %cpass12 $did(hy.join,122)
  set %cpass13 $did(hy.join,124)
  set %cpass14 $did(hy.join,126)
  set %cpass15 $did(hy.join,128)
  set %attivo $did(hy.join,38)
  set %chan1b $did(hy.join,47)
  set %chan2b $did(hy.join,49)
  set %chan3b $did(hy.join,51)
  set %chan4b $did(hy.join,53)
  set %chan5b $did(hy.join,55)
  set %chan6b $did(hy.join,57)
  set %chan7b $did(hy.join,59)
  set %chan8b $did(hy.join,61)
  set %chan9b $did(hy.join,63)
  set %chan10b $did(hy.join,65)
  set %chan11b $did(hy.join,67)
  set %chan12b $did(hy.join,69)
  set %chan13b $did(hy.join,71)
  set %chan14b $did(hy.join,73)
  set %chan15b $did(hy.join,75)
  set %serverjoinb $did(hy.join,804)
  set %cpass1b $did(hy.join,130)
  set %cpass2b $did(hy.join,132)
  set %cpass3b $did(hy.join,134)
  set %cpass4b $did(hy.join,136)
  set %cpass5b $did(hy.join,138)
  set %cpass6b $did(hy.join,140)
  set %cpass7b $did(hy.join,142)
  set %cpass8b $did(hy.join,144)
  set %cpass9b $did(hy.join,146)
  set %cpass10b $did(hy.join,148)
  set %cpass11b $did(hy.join,150)
  set %cpass12b $did(hy.join,152)
  set %cpass13b $did(hy.join,154)
  set %cpass14b $did(hy.join,156)
  set %cpass15b $did(hy.join,158)

}

on 1:connect: { 
  timerconnect 1 2 connecting 
} 


alias connecting {
  if (%Attivo == a) {
    if (%chan1 != $null) && ($network == %serverjoin) { timer1 1 1 join %chan1 }
    if (%chan2 != $null) && ($network == %serverjoin) { timer2 1 3 join %chan2 }
    if (%chan3 != $null) && ($network == %serverjoin) { timer3 1 6 join %chan3 }
    if (%chan4 != $null) && ($network == %serverjoin) { timer4 1 9 join %chan4 }
    if (%chan5 != $null) && ($network == %serverjoin) { timer5 1 12 join %chan5 }
    if (%chan6 != $null) && ($network == %serverjoin) { timer6 1 15 join %chan6 }
    if (%chan7 != $null) && ($network == %serverjoin) { timer7 1 18 join %chan7 }
    if (%chan8 != $null) && ($network == %serverjoin) { timer8 1 21 join %chan8 }
    if (%chan9 != $null) && ($network == %serverjoin) { timer9 1 24 join %chan9 }
    if (%chan10 != $null) && ($network == %serverjoin) { timer10 1 27 join %chan10 }
    if (%chan11 != $null) && ($network == %serverjoin) { timer11 1 30 join %chan11 }
    if (%chan12 != $null) && ($network == %serverjoin) { timer12 1 33 join %chan12 }
    if (%chan13 != $null) && ($network == %serverjoin) { timer13 1 36 join %chan13 }
    if (%chan14 != $null) && ($network == %serverjoin) { timer14 1 39 join %chan14 }
    if (%chan15 != $null) && ($network == %serverjoin) { timer15 1 42 join %chan15 }
    if (%cpass1 != $null) && ($network == %serverjoin) { msg chanserv identify %chan1 %cpass1 }
    if (%cpass2 != $null) && ($network == %serverjoin) { timer16 1 2 msg chanserv identify %chan2 %cpass2 }
    if (%cpass3 != $null) && ($network == %serverjoin) { timer17 1 4 msg chanserv identify %chan3 %cpass3 }
    if (%cpass4 != $null) && ($network == %serverjoin) { timer18 1 6 msg chanserv identify %chan4 %cpass4 }
    if (%cpass5 != $null) && ($network == %serverjoin) { timer19 1 8 msg chanserv identify %chan5 %cpass5 }
    if (%cpass6 != $null) && ($network == %serverjoin) { timer20 1 10 msg chanserv identify %chan6 %cpass6 }
    if (%cpass7 != $null) && ($network == %serverjoin) { timer21 1 12 msg chanserv identify %chan7 %cpass7 }
    if (%cpass8 != $null) && ($network == %serverjoin) { timer22 1 14 msg chanserv identify %chan8 %cpass8 }
    if (%cpass9 != $null) && ($network == %serverjoin) { timer23 1 16 msg chanserv identify %chan9 %cpass9 }
    if (%cpass10 != $null) && ($network == %serverjoin) { timer24 1 18 msg chanserv identify %chan10 %cpass10 }
    if (%cpass11 != $null) && ($network == %serverjoin) { timer25 1 20 msg chanserv identify %chan11 %cpass11 }
    if (%cpass12 != $null) && ($network == %serverjoin) { timer26 1 22 msg chanserv identify %chan12 %cpass12 }
    if (%cpass13 != $null) && ($network == %serverjoin) { timer27 1 24 msg chanserv identify %chan13 %cpass13 }
    if (%cpass14 != $null) && ($network == %serverjoin) { timer28 1 26 msg chanserv identify %chan14 %cpass14 }
    if (%cpass15 != $null) && ($network == %serverjoin) { timer29 1 28 msg chanserv identify %chan15 %cpass15 }
    if (%chan1b != $null) && ($network == %serverjoinb) { timer1 1 1 join %chan1b }
    if (%chan2b != $null) && ($network == %serverjoinb) { timer2 1 3 join %chan2b }
    if (%chan3b != $null) && ($network == %serverjoinb) { timer3 1 6 join %chan3b }
    if (%chan4b != $null) && ($network == %serverjoinb) { timer4 1 9 join %chan4b }
    if (%chan5b != $null) && ($network == %serverjoinb) { timer5 1 12 join %chan5b }
    if (%chan6b != $null) && ($network == %serverjoinb) { timer6 1 15 join %chan6b }
    if (%chan7b != $null) && ($network == %serverjoinb) { timer7 1 18 join %chan7b }
    if (%chan8b != $null) && ($network == %serverjoinb) { timer8 1 21 join %chan8b }
    if (%chan9b != $null) && ($network == %serverjoinb) { timer9 1 24 join %chan9b }
    if (%chan10b != $null) && ($network == %serverjoinb) { timer10 1 27 join %chan10b }
    if (%chan11b != $null) && ($network == %serverjoinb) { timer11 1 30 join %chan11b }
    if (%chan12b != $null) && ($network == %serverjoinb) { timer12 1 33 join %chan12b }
    if (%chan13b != $null) && ($network == %serverjoinb) { timer13 1 36 join %chan13b }
    if (%chan14b != $null) && ($network == %serverjoinb) { timer14 1 39 join %chan14b }
    if (%chan15b != $null) && ($network == %serverjoinb) { timer15 1 42 join %chan15b }
    if (%cpass1b != $null) && ($network == %serverjoinb) { msg chanserv identify %chan1b %cpass1b }
    if (%cpass2b != $null) && ($network == %serverjoinb) { timer16 1 2 msg chanserv identify %chan2b %cpass2b }
    if (%cpass3b != $null) && ($network == %serverjoinb) { timer17 1 4 msg chanserv identify %chan3b %cpass3b }
    if (%cpass4b != $null) && ($network == %serverjoinb) { timer18 1 6 msg chanserv identify %chan4b %cpass4b }
    if (%cpass5b != $null) && ($network == %serverjoinb) { timer19 1 8 msg chanserv identify %chan5b %cpass5b }
    if (%cpass6b != $null) && ($network == %serverjoinb) { timer20 1 10 msg chanserv identify %chan6b %cpass6b }
    if (%cpass7b != $null) && ($network == %serverjoinb) { timer21 1 12 msg chanserv identify %chan7b %cpass7b }
    if (%cpass8b != $null) && ($network == %serverjoinb) { timer22 1 14 msg chanserv identify %chan8b %cpass8b }
    if (%cpass9b != $null) && ($network == %serverjoinb) { timer23 1 16 msg chanserv identify %chan9b %cpass9b }
    if (%cpass10b != $null) && ($network == %serverjoinb) { timer24 1 18 msg chanserv identify %chan10b %cpass10b }
    if (%cpass11b != $null) && ($network == %serverjoinb) { timer25 1 20 msg chanserv identify %chan11b %cpass11b }
    if (%cpass12b != $null) && ($network == %serverjoinb) { timer26 1 22 msg chanserv identify %chan12b %cpass12b }
    if (%cpass13b != $null) && ($network == %serverjoinb) { timer27 1 24 msg chanserv identify %chan13b %cpass13b }
    if (%cpass14b != $null) && ($network == %serverjoinb) { timer28 1 26 msg chanserv identify %chan14b %cpass14b }
    if (%cpass15b != $null) && ($network == %serverjoinb) { timer29 1 28 msg chanserv identify %chan15b %cpass15b }

  }
}
