menu channel {
$iif($dialog(hb),$style(3)) Host Ban: {
dialog -dm hb hb
}
}
dialog hb {
title "Host Ban"
size -1 -1 160 115
option dbu
list 3,3 3 154 100, autohs, sort
button "Add", 4, 5 100 40 9 ,
button "Del", 5, 60 100 40 9 ,
button "Close", 6, 110 100 40 9, ok
}
on *:dialog:hb:init:*: {
did -b hb 5
if ($isfile(hb1.txt)) {
play -cs hb1.txt 0
}
}
on *:dialog:hb:sclick:3: {
set %hb.sel $did(3,$did(3).sel)
did -e hb 5
}
on *:dialog:hb:sclick:4: {
set %hb.add $$?="Enter Word:"
write hb1.txt did -a hb 3 %hb.add
write hb2.txt %hb.add
did -a hb 3 %hb.add
}
on *:dialog:hb:sclick:5: {
write -dw $+ "* $+ %hb.sel $+ *" hb1.txt
write -dw $+ "* $+ %hb.sel $+ *" hb2.txt
did -d hb 3 $did(hb,3).sel
did -b hb 5
}
on @*:JOIN:#: {
if ($read(hb2.txt,w,$+(*,$wildsite,*))) {
ban $chan $wildsite
ban $chan $nick
.timer 1 0 kick $chan $nick
}
}