alias AutoVOICE { dialog -m AutoVOICE AutoVOICE }
dialog AutoVOICE {
title AutoVOICE
size -1 -1 77 149
option dbu
box "Auto Voice System:", 1, 2 3 73 95
edit "", 2, 5 10 66 11, autohs
button "Ekle", 3, 5 81 67 8, flat
button "Sil", 4, 5 89 67 8, flat
list 5, 5 20 66 60, size
button "Tamam", 6, 6 136 66 10, cancel, flat
box "Status:", 7, 2 100 73 19
radio "On", 8, 13 107 21 10
radio "Off", 9, 44 107 32 10
box "", 10, 21 115 35 19
edit "", 11, 27 121 24 11, read limit 4 center
}
on *:dialog:autovoice:init:*: {
if (%autovoice.status == on) { did -c autovoice 8 }
else { did -c autovoice 9 }
didtok autovoice 5 32 %autovoice.list
did -a autovoice 2 %autovoice.nick
did -a autovoice 11 %autovoice.status
}
on *:dialog:autovoice:sclick:*: {
if ($did == 3) { if ($did(2).text == $null) { return } | else { did -a autovoice 5 $did(2).text | set %autovoice.list $didtok(autovoice,5,32) | .auser 5 $did(2).text | did -r autovoice 2 } }
if ($did == 4) { if ($did(5).sel == $null) { return } | else { .ruser $did(5,$did(5).sel).text | did -d autovoice 5 $did(5).sel | set %autovoice.list $didtok(autovoice,5,32) } }
if ($did == 8) { set %autovoice.status ON | .enable #autovoice | did -ra autovoice 11 %autovoice.status }
if ($did == 9) { set %autovoice.status OFF | .disable #autovoice | did -ra autovoice 11 %autovoice.status }
}
#autovoice off
on 5:join:#: {
if (%autovoice.status == on) {
mode $chan +v $nick
elseif (%autovoice.status == off) { halt }
}
}
#autovoice end |