Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- dialog BadWord {
- title " ~ BadWords - By kisho` ~"
- size -1 -1 200 185
- option dbu
- text "Système Anti-BadWords By kisho`. .", 1, 15 10 160 40, center pour
- check "On / Off", 2, 15 35 60 10
- list 3, 15 50 75 75
- edit "", 5, 100 75 70 10
- button "+", 6, 115 89 10 10
- button "-", 7, 145 89 10 10
- button "Ok", 9, 40 155 50 10, ok
- button "Close", 10, 110 155 50 10, cancel
- text "Add/Del badwords", 11, 115 65 70 10
- }
- alias badwords { dialog -m BadWord BadWord }
- on *:dialog:BadWord:init:0:{
- if (%badword == on) { did -c $dname 2 }
- else { did -u $dname 2 }
- loadbuf -o BadWord 3 bw.txt
- set %NbrLigneBw $lines(bw.txt,kisho)
- did -a $dname 14 %pavert
- did -a $dname 16 $calc(%tdev / 60)
- did -a $dname 18 %pkick
- did -a $dname 20 %pban
- did -a $dname 22 $calc(%tban / 60)
- did -a $dname 24 %pdev
- }
- on *: dialog:BadWord:edit:*:{
- if ($did(14) != $null) { set %pavert $did(14) }
- else { unset %pavert }
- if ($did(16) != $null ) { set %tdev $calc($did(16) * 60) }
- else { unset %tdev }
- if ($did(18) != $null ) { set %pkick $did(18) }
- else { unset %pkick }
- if ($did(20) != $null ) { set %pban $did(20) }
- else { unset %pban }
- if ($did(22) != $null ) { set %tban $calc($did(22) * 60) }
- else { unset %tban }
- if ($did(24) != $null ) { set %pdev $did(24) }
- else { unset %pdev }
- }
- on *:dialog:BadWord:sclick:*:{
- if ($did(2).state == 1) { set %badword on }
- else { unset %badword }
- if ($did == 6) { write bw.txt $did(5)
- echo -a ***** You have added " $+ $did(5) $+ " to the file
- writeini -n bw.ini Words $did(5) $did(5)
- did -a $dname 3 $did(5)
- }
- if ($did == 7) {
- echo -a 14* Badwords has been removed 3 $did(3).seltext 14 from the list.
- remini bw.ini Words $did(3).seltext
- did -d BadWord 3 $did(3).sel
- write -c bw.txt
- set %BWcompteur 1
- set %MaxBW $did(3).lines
- while ( %BWcompteur <= %MaxBW ) {
- write bw.txt $did(3,%BWcompteur).text
- inc %BWcompteur
- }
- }
- }
- menu channel,menubar {
- BadWords : /dialog -m BadWord BadWord
- }
- on *:text:*:#a:{
- if (%badword == on) {
- var %words $readini(bw.ini,Words,$2-)
- var %a = $numtok(%words,32)
- while (%a) {
- if ( $gettok(%words,%a,32) isin $1- ) && (!%words. [ $+ [ $nick ] ]) { inc -u120 %words. [ $+ [ $nick ] ] | shun $nick 900 badword | .kick # $nick BadWords }
- elseif ( $gettok(%words,%a,32) isin $1- ) && (%words. [ $+ [ $nick ] ] == 1) { inc -u120 %words. [ $+ [ $nick ] ] | shun $nick 900 badword | .kick # $nick BadWords }
- elseif ( $gettok(%words,%a,32) isin $1- ) && (%words. [ $+ [ $nick ] ] == 2) { kick $chan $nick Language Please | shun $nick 900 badword | .kick # $nick BadWords | unset %words. [ $+ [ $nick ] ] }
- dec %a
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement