menu channel {
$iif($dialog(protect),$style(3)) Protect Users: {
dialog -dm protect protect
}
}
dialog protect {
title "protect"
size -1 -1 84 132
option dbu
list 3,5 20 74 100, autohs, sort
button "Add", 4, 5 119 16 9 ,
button "Del", 5, 24 119 16 9 ,
button "Close", 6, 59 119 20 9, ok
}
on *:dialog:protect:init:*: {
did -b protect 5
if ($exists(protect1.txt)) {
play -cs protect1.txt 0
}
}
on *:dialog:protect:sclick:3: {
set %protect.sel $did(3,$did(3).sel)
did -e protect 5
}
on *:dialog:protect:sclick:4: {
set %protect.add $$?="Enter Word:"
write protect1.txt did -a protect 3 %protect.add
write protect2.txt %protect.add
did -a protect 3 %protect.add
}
on *:dialog:protect:sclick:5: {
write -dw $+ "* $+ %protect.sel $+ *" protect1.txt
write -dw $+ "* $+ %protect.sel $+ *" protect2.txt
did -d protect 3 $did(protect,3).sel
did -b protect 5
}
on *:Open:?:*: {
if ($read(protect2.txt,w,$+(,$nick))) { return }
elseif ($nick isreg #escapechat) { ban -ku120 #Escapechat $nick 2 Read topic. Do not PM me. 2min ban. }
}