dialog channeltextprotection { title "Channel Text Protection By JeSTeR" size -1 -1 335 214 option dbu box "Channel Advertisments", 1, 6 10 146 136 list 2, 11 37 102 104, size edit "", 3, 11 22 102 11 button "+ADD", 4, 117 22 30 12 button "-DEL", 5, 117 39 30 12 box "Channel Swearing", 6, 179 10 146 136 list 7, 184 37 102 104, size edit "", 8, 184 22 102 11 button "+ADD", 9, 290 22 30 12 button "-DEL", 10, 290 39 30 12 text "Ban duration (seconds):", 12, 10 168 65 8 box "Channel Advertisments Settings", 11, 6 156 146 39 edit "", 13, 81 167 28 10 text "Kick Reason:", 14, 9 180 33 8 edit "", 15, 43 179 104 10 box "Channel Swearing Settings", 16, 179 156 146 39 edit "", 17, 254 167 28 10 text "Kick Reason:", 18, 182 180 33 8 text "Ban duration (seconds):", 19, 183 168 65 8 edit "", 20, 216 179 104 10 text "Channel Protection Script/Addon Made By JeSTeR Especially For BlueHell Scripts", 21, 7 201 237 8 button "Close", 22, 291 198 37 12, ok } on *:dialog:channeltextprotection:*:*: { if ($dname == channeltextprotection) && ($devent == init) && ($did == 0) { set %advertexts 1 while (%advertexts <= $lines(advertexts.txt)) { did -a channeltextprotection 2 $read(advertexts.txt,%advertexts) inc %advertexts 1 } } if ($dname == channeltextprotection) && ($devent == sclick) && ($did == 4) { .write -a advertexts.txt $did(3,edited) .did -a channeltextprotection 2 $did(3,edited) } if ($dname == channeltextprotection) && ($devent == sclick) && ($did == 5) { write -dl [ $+ [ $did(channeltextprotection,2).sel ] ] advertexts.txt did -d channeltextprotection 2 $did(channeltextprotection,2).sel } if ($dname == channeltextprotection) && ($devent == init) && ($did == 0) { set %badtexts 1 while (%badtexts <= $lines(badtexts.txt)) { did -a channeltextprotection 7 $read(badtexts.txt,%badtexts) inc %badtexts 1 } } if ($dname == channeltextprotection) && ($devent == sclick) && ($did == 9) { .write -a badtexts.txt $did(8,edited) .did -a channeltextprotection 7 $did(8,edited) } if ($dname == channeltextprotection) && ($devent == sclick) && ($did == 10) { write -dl [ $+ [ $did(channeltextprotection,7).sel ] ] badtexts.txt did -d channeltextprotection 7 $did(channeltextprotection,7).sel } if ($devent == edit) && ($did = 13) { .set %timebanadver $did(13,edited) } if ($devent == edit) && ($did = 17) { .set %timebanswear $did(17,edited) } if ($devent == edit) && ($did = 15) { .set %reasonadver $did(15,edited) } if ($devent == edit) && ($did = 20) { .set %reasonswear $did(20,edited) } if ($dname == channeltextprotection) && ($devent == init) && ($did == 0) { did -a channeltextprotection 13 %timebanadver did -a channeltextprotection 17 %timebanswear did -a channeltextprotection 15 %reasonadver did -a channeltextprotection 20 %reasonswear } } alias channeltextprotection { dialog -m channeltextprotection channeltextprotection } on @*:TEXT:*:#:{ set %advertest 1 while (%advertest <= $lines(advertexts.txt)) { inc %advertest 1 if ($read(advertexts.txt,%advertest) isin $1-) { ban -ku $+ %timebanadver # $nick 2 %reasonadver Banned: $duration(%timebanadver) } } }