dialog aid {
title "Auto Identify Setup"
size -1 -1 340 220
button "OK",1, 195 5 120 20, cancel flat
button "Cancel",2, 195 30 120 20, ok flat
text " Check To Turn Auto Identify",3, 14 32 150 40
radio "ON",4, 95 5 40 20
radio "OFF",5, 45 5 40 20,group
box "Nick-1",6,10 60 150 70
text "Nick",7,20 80 30 20
text "Pass",8,20 100 30 20
edit "",9, 45 80 110 20,autohs
edit "",10, 45 100 110 20,autohs,pass
box "Nick-2",11,180 60 150 70
text "Nick",12,190 80 30 20
text "Pass",13,190 100 30 20
edit "",14, 215 80 110 20,autohs
edit "",15, 215 100 110 20,autohs,pass
box "Nick-3",16,10 130 150 70
text "Nick",17,20 150 30 30
text "Pass",18,20 170 30 20
edit "",19, 45 150 110 20,autohs
edit "",20, 45 170 110 20,autohs,pass
box "Nick-4",21,180 130 150 70
text "Nick",22,190 150 85 20
text "Pass",23,190 170 85 20
edit "",24, 215 150 110 20,autohs
edit "",25, 215 170 110 20,autohs,pass
}
on *:dialog:aid:sclick:1: {
if ($did(aid,9).text) { /set %nickn1 $did(9).text }
if ($did(aid,10).text) { /set %pass.1 $did(10).text }
if ($did(aid,14).text) { /set %nickn2 $did(14).text }
if ($did(aid,15).text) { /set %pass.2 $did(15).text }
if ($did(aid,19).text) { /set %nickn3 $did(19).text }
if ($did(aid,20).text) { /set %pass.3 $did(20).text }
if ($did(aid,24).text) { /set %nickn4 $did(24).text }
if ($did(aid,25).text) { /set %pass.4 $did(25).text }
if ($did(aid,4).state == 1) { /set %nident on }
if ($did(aid,5).state == 1) { /set %nident off }
}
on 1:dialog:aid:init:0: {
did -a aid 9 %nickn1
did -a aid 14 %nickn2
did -a aid 19 %nickn3
did -a aid 24 %nickn4
did -a aid 10 %pass.1
did -a aid 15 %pass.2
did -a aid 20 %pass.3
did -a aid 25 %pass.4
if (%nident == on) { did -c aid 4 }
if (%nident == off) { did -c aid 5 }
}
on 1:CONNECT:{
if (%nident == On) {
if ($me == %nickn1) { /nickserv identify %pass.1 | halt }
if ($me == %nickn2) { /nickserv identify %pass.2 | halt }
if ($me == %nickn3) { /nickserv identify %pass.3 | halt }
if ($me == %nickn4) { /nickserv identify %pass.4 | halt }
}
}
on 1:NOTICE:This nickname is owned by someone else*:?:{
if ((%nident == On) && ($nick == nickserv)) {
if ($me == %nickn1) { /nickserv identify %pass.1 | halt }
if ($me == %nickn2) { /nickserv identify %pass.2 | halt }
if ($me == %nickn3) { /nickserv identify %pass.3 | halt }
if ($me == %nickn4) { /nickserv identify %pass.4 | halt }
}
}