rendered paste bodydialog ajoin {
title "Auto Join v1"
size -1 -1 392 73
option dbu
combo 1, 1 1 70 72, size edit hsbar vsbar drop
text "AutoJoin Networks", 2, 73 2 59 8, center
check "Network Has Services", 4, 72 16 85 10
check "Autojoin Channels After Identification To Nickserv", 5, 80 27 128 10, disable
check "Bypass If Nickserv is OFFLINE", 6, 80 38 82 10, disable
check "Oper", 7, 72 49 23 10
edit "Login", 8, 99 49 50 10, disable autohs
edit "Pass", 9, 151 49 50 10, disable autohs
list 10, 212 15 74 31, size hsbar vsbar
text "Channels To Join On Network", 11, 213 6 71 8, center
check "Autojoin Channels When Invited By", 12, 295 6 95 10
list 13, 295 16 95 30, disable size hsbar vsbar
button "Add Nick", 14, 298 46 37 12, disable
button "Del Nick", 15, 343 46 37 12, disable
button "Add Chan", 16, 213 47 37 12, disable
button "Del Chan", 17, 251 47 37 12, disable
button "Close", 18, 354 60 37 12, ok cancel
button "Add", 19, 2 12 25 12
button "Del", 20, 42 12 26 12
}
menu channel,menu {
AutoJoin Setup: ajoin open
}
alias aj.r { $readini($scriptdiraj.ini, $$1, $$2) }
alias aj.w { echo -a writeini $scriptdiraj.ini $$1 $$2 $$3- }
alias ajoin {
if ($1 == open) {
$iif($dialog(ajoin) != $null, dialog -x ajoin) | dialog -dm ajoin ajoin
}
}
on *:dialog:ajoin:*:*: {
if ($devent == init) { }
if ($devent == sclick) {
;ADD NETWORK
if ($did == 19) {
if ($did(ajoin,1).text == $null) return
var %networks = $aj.r(Networks,Networks)
if ($istok(%networks, $did($dname,1).text, 32) == $true) { echo -a CLEARING | did -c $dname 1 | return }
aj.w Networks Networks %networks $did($dname,1).text
aj.w Services $did($dname,1).text 0
aj.w Oper $did($dname,1).text 0 null null
did -az $dname 1 $did($dname,1).text
}
}
if ($devent == edit) { }
if ($devent != mouse) echo -a $did - $devent
}