menu menubar,channel { Kufur Koruması:swearprot } dialog swearprot { title "§ â ñ ¢ â K - Kufur Koruması" size -1 -1 145 206 option dbu box "Arkadaş listesi", 1, 2 2 59 75 edit "", 2, 6 10 50 10 list 3, 6 20 50 38, size button "Add", 4, 6 61 16 12, flat button "Del", 5, 23 61 16 12, flat button "D-All", 6, 40 61 16 12, flat box "Filter", 7, 2 78 59 75 edit "", 8, 6 86 50 10 list 9, 6 96 50 38, size button "Add", 10, 6 137 16 12, flat button "Del", 11, 23 137 16 12, flat button "D-All", 12, 40 137 16 12, flat box "Ayrıcalıklı Kullanıcılar", 13, 64 2 79 48 check "(@) Opları Koru ", 14, 69 11 70 10, group flat check "(+) Voiceleri Koru ", 15, 69 23 70 10, flat check "Arkadas listesini Koru ", 16, 69 35 71 10, flat box "Ceza", 17, 64 51 79 48 radio "Kick + Limitsiz Ban", 18, 68 60 70 10, group flat radio "Kick + Limitli Ban", 19, 68 72 69 10, flat radio "Sadece Kick", 20, 68 84 68 10, flat box "Ban Masks", 21, 64 100 79 53 combo 22, 69 109 69 41, size drop box "Kick Mesajı && Ban Suresi", 23, 2 154 141 23 edit "", 24, 6 162 110 10 edit "", 25, 117 162 22 10 box "Ayarlar", 26, 2 178 72 22 radio "Acik", 27, 7 186 30 10, group flat radio "Kapali", 28, 39 186 30 10, flat button "KAPAT", 30, 80 181 63 19, default ok } alias swearprot { if (!$dialog(swearprot)) { dialog -m swearprot swearprot } } on *:dialog:*:*:*:{ if ($dname == swearprot) { if ($devent == sclick) { if ($did == 3) && ($did(3).seltext != $null) { did -ra $dname 2 $did(3).seltext } if ($did == 4) && ($did(2).text != $null) && ($numtok($did(2).text,32) == 1) { set %_ $numtok(%swearprot.friends.list,32) set %swearprot.friends.list $addtok(%swearprot.friends.list,$did(2).text,32) if (%_ != $numtok(%swearprot.friends.list,32)) { did -a $dname 3 $did(2).text | did -r $dname 2 } } if ($did == 5) && ($did(3).sel != $null) { set %swearprot.friends.list $deltok(%swearprot.friends.list,$did(3).sel,32) did -r $dname 2,3 | didtok $dname 3 32 %swearprot.friends.list } if ($did == 6) { unset %swearprot.friends.list | did -r $dname 2,3 } if ($did == 9) && ($did(9).seltext != $null) { did -ra $dname 8 $did(9).seltext } if ($did == 10) && ($did(8).text != $null) { set %_ $numtok(%swearprot.filter,1) set %swearprot.filter $addtok(%swearprot.filter,$did(8).text,1) if (%_ != $numtok(%swearprot.filter,1)) { did -a $dname 9 $did(8).text | did -r $dname 8 } } if ($did == 11) && ($did(9).sel != $null) { set %swearprot.filter $deltok(%swearprot.filter,$did(9).sel,1) did -r $dname 8,9 | didtok $dname 9 1 %swearprot.filter } if ($did == 12) { unset %swearprot.filter | did -r $dname 8,9 } if ($did == 14) { if ($did(14).state == 0) { set %swearprot.protect.ops Off } if ($did(14).state == 1) { set %swearprot.protect.ops On } } if ($did == 15) { if ($did(15).state == 0) { set %swearprot.protect.vos Off } if ($did(15).state == 1) { set %swearprot.protect.vos On } } if ($did == 16) { if ($did(16).state == 0) { set %swearprot.protect.frs Off } if ($did(16).state == 1) { set %swearprot.protect.frs On } } if ($did == 18) { set %swearprot.punish.style 1 } if ($did == 19) { set %swearprot.punish.style 2 } if ($did == 20) { set %swearprot.punish.style 3 } if ($did == 22) && ($did(22).sel != $null) { set %swearprot.banmask $did(22).sel } if ($did == 27) { set %swearprot.state On } if ($did == 28) { set %swearprot.state Off } if ($did == 29) { swearprotabout } } if ($devent == edit) { if ($did == 24) && ($did(24).text != $null) { set %swearprot.kickmsg $did(24).text } if ($did == 25) && ($did(25).text != $null) { if ($iif($did(25).text isnum,1,2) == 1) { set %swearprot.bantime $did(25).text } if ($iif($did(25).text isnum,1,2) == 2) { did -r $dname 25 } } } if ($devent == init) && ($did == 0) { did -a $dname 24 %swearprot.kickmsg did -a $dname 25 %swearprot.bantime didtok $dname 3 32 %swearprot.friends.list didtok $dname 9 1 %swearprot.filter did -a $dname 22 *!user@host did -a $dname 22 *!*user@host did -a $dname 22 *!*@host did -a $dname 22 *!*user@*.host did -a $dname 22 *!*@*.host did -a $dname 22 nick!user@host did -a $dname 22 nick!*user@host did -a $dname 22 nick!*@host did -a $dname 22 nick!*user@*.host did -a $dname 22 nick!*@*.host did -c $dname 22 %swearprot.banmask if (%swearprot.protect.ops == On) { did -c $dname 14 } if (%swearprot.protect.vos == On) { did -c $dname 15 } if (%swearprot.protect.frs == On) { did -c $dname 16 } if (%swearprot.punish.style == 1) { did -c $dname 18 } if (%swearprot.punish.style == 2) { did -c $dname 19 } if (%swearprot.punish.style == 3) { did -c $dname 20 } if (%swearprot.state == On) { did -c $dname 27 } if (%sweraprot.state == Off) { did -c $dname 28 } } } if ($dname == swearprotabout) { if ($devent == init) && ($did == 0) { did -m $dname 3,5,7 | did -f $dname 1 } if ($devent == sclick) { dialog -x $dname } } } on *:TEXT:*:#:{ if (%swearprot.state == On) && ($me isop #) { if ($nick isop #) && (%swearprot.protect.ops == On) { halt } if ($nick isvo #) && (%swearprot.protect.vos == On) { halt } if ($istok(%swearprot.friends.list,$nick,32)) && (%swearprot.protect.frs == On) { halt } var %temp1 = 0 while (%temp1 <= $numtok(%swearprot.filter,1)) { inc %temp1 if ($gettok(%swearprot.filter,%temp1,1) isin $1-) { if (%swearprot.punish.style == 1) { if ($nick ison #) && (%swearprot.banmask != $null) { mode # +b $address($nick,%swearprot.banmask) if ($nick ison #) { kick # $nick %swearprot.kickmsg } } } if (%swearprot.punish.style == 2) { if ($nick ison #) && (%swearprot.banmask != $null) && (%swearprot.bantime != $null) { ban -u $+ [ %swearprot.bantime ] # $address($nick,%swearprot.banmask) if ($nick ison #) { kick # $nick %swearprot.kickmsg } } } if (%swearprot.punish.style == 3) { if ($nick ison #) { kick # $nick %swearprot.kickmsg } } } } } } on *:NOTICE:*:#:{ if (%swearprot.state == On) && ($me isop #) { if ($nick isop #) && (%swearprot.protect.ops == On) { halt } if ($nick isvo #) && (%swearprot.protect.vos == On) { halt } if ($istok(%swearprot.friends.list,$nick,32)) && (%swearprot.protect.frs == On) { halt } var %temp2 = 0 while (%temp2 <= $numtok(%swearprot.filter,1)) { inc %temp2 if ($gettok(%swearprot.filter,%temp2,1) isin $1-) { if (%swearprot.punish.style == 1) { if ($nick ison #) && (%swearprot.banmask != $null) { mode # +b $address($nick,%swearprot.banmask) if ($nick ison #) { kick # $nick %swearprot.kickmsg } } } if (%swearprot.punish.style == 2) { if ($nick ison #) && (%swearprot.banmask != $null) && (%swearprot.bantime != $null) { ban -u $+ [ %swearprot.bantime ] # $address($nick,%swearprot.banmask) if ($nick ison #) { kick # $nick %swearprot.kickmsg } } } if (%swearprot.punish.style == 3) { if ($nick ison #) { kick # $nick %swearprot.kickmsg } } } } } } on *:ACTION:*:#:{ if (%swearprot.state == On) && ($me isop #) { if ($nick isop #) && (%swearprot.protect.ops == On) { halt } if ($nick isvo #) && (%swearprot.protect.vos == On) { halt } if ($istok(%swearprot.friends.list,$nick,32)) && (%swearprot.protect.frs == On) { halt } var %temp3 = 0 while (%temp3 <= $numtok(%swearprot.filter,1)) { inc %temp3 if ($gettok(%swearprot.filter,%temp3,1) isin $1-) { if (%swearprot.punish.style == 1) { if ($nick ison #) && (%swearprot.banmask != $null) { mode # +b $address($nick,%swearprot.banmask) if ($nick ison #) { kick # $nick %swearprot.kickmsg } } } if (%swearprot.punish.style == 2) { if ($nick ison #) && (%swearprot.banmask != $null) && (%swearprot.bantime != $null) { ban -u $+ [ %swearprot.bantime ] # $address($nick,%swearprot.banmask) if ($nick ison #) { kick # $nick %swearprot.kickmsg } } } if (%swearprot.punish.style == 3) { if ($nick ison #) { kick # $nick %swearprot.kickmsg } } } } } } on *:load:{ swearprot }