;remote4
on @1:text:*:#: {
  set %i 0
  :checking
  inc %i 1
  set %currentsword $read -l $+ %i $mircdirOzlemSohbet\Jiyan\swear.mrc 
  if (%currentsword == $null) { .unset %i | goto end }
  else {
    if (%currentsword isin $1-) { goto offense }
    else { goto checking }
  }
  :offense
  if ($nick !isop $chan) { /swearkick }
  .goto end  
  :end
}
on @1:ACTION:*:#: {
  set %i 0
  :checking
  inc %i 1
  set %currentsword $read -l $+ %i $mircdirOzlemsohbet\Jiyan\swear.mrc 
  if (%currentsword == $null) { .unset %i | goto end }
  else {
    if (%currentsword isin $1-) { goto offense }
    else { goto checking }
  }
  :offense
  if ($nick !isop $chan) { /swearkick }
  .goto end  
  :end
}

alias swearkick {
  if (%swear == OFF) { goto nop }
  elseif (%swear.offkick == ON) && (%cuss. [ $+ [ $nick ] ] != on) { /kick $chan $nick %swearkmsg %isim | set %cuss. [ $+ [ $nick ] ] on | halt }
  elseif (%swear.offkick == ON) && (%cuss. [ $+ [ $nick ] ] == on) { swearban | halt }
  elseif (%swear.offkickban == ON) { /swearban | halt }
  elseif (%swear.offkicktban == ON) { /ban2 -u $+ %swearban $chan $nick %Bantype2 | kick $chan $nick %swearkmsg %isim 1[1 %swearbantime 1 Dakika Ban 1]  $+ $colour(kick text) | halt }
  else goto nop

  :nop
}
alias swearban {
  ban2 $chan $nick %Bantype2 
  kick $chan $nick  %swearkmsg %isim %banned
  unset %cuss. [ $+ [ $nick ] ] 
}   

dialog pref.swear {
  title "OzlemCafe mIRC"
  size -1 -1 250 135
  text "( 2. Tekrarda Banla )" 1, 100 34 110 20
  box "Kufur Kick ",4, 20 15 210 82
  radio "Kick",5, 35 35 45 12, group 
  radio "Kick/Ban",6, 35 55 70 12
  radio "Zamanli Kick/Ban",7, 35 75 105 12
  combo 8, 140 70 40 120, edit, drop
  text "Dk." 9, 185 75 50 20
  button "Tamam", 200, 15 107 220 20, ok 
  button "Listele",241,180 2 50 18, tab 10 
}
on 1:dialog:pref.swear:*:*: {
  if ($devent == init) {
    did -a pref.swear 8 1
    did -a pref.swear 8 2
    did -a pref.swear 8 5
    did -a pref.swear 8 10
    did -a pref.swear 8 30
    did -a pref.swear 8 60
    swearnext 8 swearbantime
    if (%swear.offkick == ON) { did -c pref.swear 5 }
    if (%swear.offkickban == ON) { did -c pref.swear 6 }
    if (%swear.offkicktban == ON) { did -c pref.swear 7 }
  }
  %swearbantime = $did(pref.swear, 8).text | set %swearban $calc(%swearbantime * 60)
  if ($devent == sclick) {
    if ($did == 5) { set %swear.offkick ON | set %swear.offkickban OFF | set %swear.offkicktban OFF } 
    if ($did == 6) { set %swear.offkick OFF | set %swear.offkickban ON | set %swear.offkicktban OFF } 
    if ($did == 7) { set %swear.offkick OFF | set %swear.offkickban OFF | set %swear.offkicktban ON } 
    if ($devent == sclick) && ($did == 241) { if ($dialog(swear)) { echo -a 0,2 Kufur Listesi Zaten Acik | halt } | dialog -m swear swear }

  }
  if ($devent == edit) && ($did == 3) { set %swearkickmsg $did(3) }
}
alias swearnext {
  if (% [ $+ [ $$2 ] ] == 1) { did -c pref.swear $1 1 }
  if (% [ $+ [ $$2 ] ] == 2) { did -c pref.swear $1 2 }
  if (% [ $+ [ $$2 ] ] == 5) { did -c pref.swear $1 3 }
  if (% [ $+ [ $$2 ] ] == 10) { did -c pref.swear $1 4 }
  if (% [ $+ [ $$2 ] ] == 30) { did -c pref.swear $1 5 }
  if (% [ $+ [ $$2 ] ] == No) { did -c pref.swear $1 6 }
}
dialog pref.badnick {
  title "OzlemCafe mIRC"
  size -1 -1 250 135
  text "Sadece Nicklere ( nick!*@* )" 1, 30 34 175 20
  box "Bad Nick Kick ",4, 20 15 210 82
  radio "Kick/Ban",6, 35 55 70 12, group 
  radio "Zamanli Kick/Ban",7, 35 75 105 12
  combo 8, 140 70 40 120, edit, drop
  text "Dak." 9, 185 75 50 20
  button "Tamam", 200, 15 107 220 20, ok  
  button "Listele",242,180 2 50 18, tab 10 
}
on 1:dialog:pref.badnick:*:*: {
  if ($devent == init) {
    did -a pref.badnick 8 1
    did -a pref.badnick 8 2
    did -a pref.badnick 8 5
    did -a pref.badnick 8 10
    did -a pref.badnick 8 30
    did -a pref.badnick 8 60
    badnicknext 8 badnickbantime
    if (%badnick.offkickban == ON) { did -c pref.badnick 6 }
    if (%badnick.offkicktban == ON) { did -c pref.badnick 7 }
  }
  %badnickbantime = $did(pref.badnick, 8).text | set %badnickban $calc(%badnickbantime * 60)
  if ($devent == sclick) {
    if ($did == 6) { set %badnick.offkickban ON | set %badnick.offkicktban OFF } 
    if ($did == 7) { set %badnick.offkickban OFF | set %badnick.offkicktban ON } 
    if ($devent == sclick) && ($did == 242) { if ($dialog(bad-nick)) { echo -a 0,2 Bad Nick Listesi Zaten Acik | halt } | dialog -m bad-nick bad-nick }

  }
  if ($devent == edit) && ($did == 3) { set %badnickkickmsg $did(3) }
}
alias badnicknext {
  if (% [ $+ [ $$2 ] ] == 1) { did -c pref.badnick $1 1 }
  if (% [ $+ [ $$2 ] ] == 2) { did -c pref.badnick $1 2 }
  if (% [ $+ [ $$2 ] ] == 5) { did -c pref.badnick $1 3 }
  if (% [ $+ [ $$2 ] ] == 10) { did -c pref.badnick $1 4 }
  if (% [ $+ [ $$2 ] ] == 30) { did -c pref.badnick $1 5 }
  if (% [ $+ [ $$2 ] ] == No) { did -c pref.badnick $1 6 }
}
alias newbadnickkick {
  if (%badnick.offkickban == ON) { ban $comchan($newnick,1) $newnick | kick $comchan($newnick,1) $newnick %bnickkmsg %isim | halt }
  elseif (%badnick.offkicktban == ON) { ban -u $+ %badnickban $comchan($newnick,1) $newnick 7 | kick $comchan($newnick,1) $newnick %bnickkmsg %isim 1[1 %badnickbantime 1 Dakika Ban 1]  $+ $colour(kick text) | halt }
  else goto nop

  :nop
}
alias badnickkick {
  if (%badnick.offkickban == ON) { mode $chan +b $nick %Bantype2 | kick $chan  %bnick %bnickkmsg %isim | halt }
  elseif (%badnick.offkicktban == ON) { ban -u $+ %badnickban $chan $nick %Bantype2 | kick $chan $nick %bnickkmsg %isim 1[1 %badnickbantime 1 Dakika Ban 1]  $+ $colour(kick text) | halt }
  else goto nop

  :nop
}
;alias badidkick {
if (%badid.offkickban == ON) { mode $chan +b $nick | kick $chan  %bid %bnickkmsg %isim | halt }
elseif (%badid.offkicktban == ON) { mode $chan +b  $nick %Bantype2 | kick $chan %bid %bnickkmsg %isim | halt }
else goto nop

:nop
;}
dialog pref.repeat {
  title "OzlemCafe mIRC"
  size -1 -1 250 135
  text "( 2. Tekrarda Banla )" 1, 100 34 110 20
  box "Tekrar Kick ",4, 20 15 210 82
  radio "Kick",5, 35 35 45 12, group 
  radio "Kick/Ban",6, 35 55 70 12
  radio "Zamanli Kick/Ban",7, 35 75 105 12
  combo 8, 140 70 40 120, edit, drop
  text "Dk." 9, 185 75 50 20
  button "Tamam", 200, 15 107 220 20, ok 
}
on 1:dialog:pref.repeat:*:*: {
  if ($devent == init) {
    did -a pref.repeat 8 1
    did -a pref.repeat 8 2
    did -a pref.repeat 8 5
    did -a pref.repeat 8 10
    did -a pref.repeat 8 30
    did -a pref.repeat 8 60
    repeatnext 8 repeatbantime
    if (%repeat.offkick == ON) { did -c pref.repeat 5 }
    if (%repeat.offkickban == ON) { did -c pref.repeat 6 }
    if (%repeat.offkicktban == ON) { did -c pref.repeat 7 }
  }
  %repeatbantime = $did(pref.repeat, 8).text | set %repeatban $calc(%repeatbantime * 60)
  if ($devent == sclick) {
    if ($did == 5) { set %repeat.offkick ON | set %repeat.offkickban OFF | set %repeat.offkicktban OFF } 
    if ($did == 6) { set %repeat.offkick OFF | set %repeat.offkickban ON | set %repeat.offkicktban OFF } 
    if ($did == 7) { set %repeat.offkick OFF | set %repeat.offkickban OFF | set %repeat.offkicktban ON } 
  }
  if ($devent == edit) && ($did == 3) { set %repeatkickmsg $did(3) }
}
alias repeatnext {
  if (% [ $+ [ $$2 ] ] == 1) { did -c pref.repeat $1 1 }
  if (% [ $+ [ $$2 ] ] == 2) { did -c pref.repeat $1 2 }
  if (% [ $+ [ $$2 ] ] == 5) { did -c pref.repeat $1 3 }
  if (% [ $+ [ $$2 ] ] == 10) { did -c pref.repeat $1 4 }
  if (% [ $+ [ $$2 ] ] == 30) { did -c pref.repeat $1 5 }
  if (% [ $+ [ $$2 ] ] == No) { did -c pref.repeat $1 6 }
}
alias repeatkick {
  if (%repeat.offkick == ON) && (%brep [ $+ [ $nick ] ] != on) { /kick $chan $nick %repeatkmsg %isim | set %brep [ $+ [ $nick ] ] on | striker | halt }
  elseif (%repeat.offkick == ON) && (%brep [ $+ [ $nick ] ] == on) { repeatban | striker | halt }
  elseif (%repeat.offkickban == ON) { /repeatban | halt }
  elseif (%repeat.offkicktban == ON) { /ban2 -u $+ %repeatban $chan $nick %Bantype2 | kick $chan $nick %repeatkmsg %isim 1[1 %repeatbantime 1 Dakika Ban 1]  $+ $colour(kick text) | striker | halt }
  else goto nop

  :nop
}
alias repeatban {
  ban2 $chan $nick %Bantype2
  kick $chan $nick %repeatkmsg %isim %banned
  /unset %brep [ $+ [ $nick ] ] 
  striker
}   

dialog pref.flood {
  title "OzlemCafe mIRC"
  size -1 -1 250 135
  text "( 2. Tekrarda Banla )" 1, 100 34 110 20
  box "Flood Kick ",4, 20 15 210 82
  radio "Kick",5, 35 35 45 12, group 
  radio "Kick/Ban",6, 35 55 70 12
  radio "Zamanli Kick/Ban",7, 35 75 105 12
  combo 8, 140 70 40 120, edit, drop
  text "Dk." 9, 185 75 50 20
  button "Tamam", 200, 15 107 220 20, ok 
}
on 1:dialog:pref.flood:*:*: {
  if ($devent == init) {
    did -a pref.flood 8 1
    did -a pref.flood 8 2
    did -a pref.flood 8 5
    did -a pref.flood 8 10
    did -a pref.flood 8 30
    did -a pref.flood 8 60
    floodnext 8 floodbantime
    if (%flood.offkick == ON) { did -c pref.flood 5 }
    if (%flood.offkickban == ON) { did -c pref.flood 6 }
    if (%flood.offkicktban == ON) { did -c pref.flood 7 }
  }
  %floodbantime = $did(pref.flood, 8).text | set %floodban $calc(%floodbantime * 60)
  if ($devent == sclick) {
    if ($did == 5) { set %flood.offkick ON | set %flood.offkickban OFF | set %flood.offkicktban OFF } 
    if ($did == 6) { set %flood.offkick OFF | set %flood.offkickban ON | set %flood.offkicktban OFF } 
    if ($did == 7) { set %flood.offkick OFF | set %flood.offkickban OFF | set %flood.offkicktban ON } 
  }
  if ($devent == edit) && ($did == 3) { set %floodkickmsg $did(3) }
}
alias floodnext {
  if (% [ $+ [ $$2 ] ] == 1) { did -c pref.flood $1 1 }
  if (% [ $+ [ $$2 ] ] == 2) { did -c pref.flood $1 2 }
  if (% [ $+ [ $$2 ] ] == 5) { did -c pref.flood $1 3 }
  if (% [ $+ [ $$2 ] ] == 10) { did -c pref.flood $1 4 }
  if (% [ $+ [ $$2 ] ] == 30) { did -c pref.flood $1 5 }
  if (% [ $+ [ $$2 ] ] == No) { did -c pref.flood $1 6 }
}
alias floodkick {
  if (%flood.offkick == ON) && (%bflood [ $+ [ $nick ] ] != on) { /kick $chan $nick %floodkmsg %isim | set %bflood [ $+ [ $nick ] ] on | striker | halt }
  elseif (%flood.offkick == ON) && (%bflood [ $+ [ $nick ] ] == on) { floodban | halt }
  elseif (%flood.offkickban == ON) { /floodban | halt }
  elseif (%flood.offkicktban == ON) { /ban2 -u $+ %floodban $chan $nick %Bantype2 | kick $chan $nick %floodkmsg %isim 1[1 %floodbantime 1 Dakika Ban 1]  $+ $colour(kick text) | striker | halt }
  else goto nop

  :nop
  halt
}
alias striker {
  unset %*XXX [ $+ [ $nick ] $+ [ $chan ] ]
}
alias floodban {
  ban2 $chan $nick %Bantype2
  kick $chan $nick %floodkmsg %isim %banned
  /unset %bflood [ $+ [ $nick ] ] 
  striker
  halt
}   

dialog pref.caps {
  title "OzlemCafe mIRC"
  size -1 -1 250 135
  text "( 2. Tekrarda Banla )" 1, 100 34 110 20
  box "Caps Kick ",4, 20 15 210 82
  radio "Kick",5, 35 35 45 12, group 
  radio "Kick/Ban",6, 35 55 70 12
  radio "Zamanli Kick/Ban",7, 35 75 105 12
  combo 8, 140 70 40 120, edit, drop
  text "Dk." 9, 185 75 50 20
  button "Tamam", 200, 15 107 220 20, ok 
}
on 1:dialog:pref.caps:*:*: {
  if ($devent == init) {
    did -a pref.caps 8 1
    did -a pref.caps 8 2
    did -a pref.caps 8 5
    did -a pref.caps 8 10
    did -a pref.caps 8 30
    did -a pref.caps 8 60
    capsnext 8 capsbantime
    if (%caps.offkick == ON) { did -c pref.caps 5 }
    if (%caps.offkickban == ON) { did -c pref.caps 6 }
    if (%caps.offkicktban == ON) { did -c pref.caps 7 }
  }
  %capsbantime = $did(pref.caps, 8).text | set %capsban $calc(%capsbantime * 60)
  if ($devent == sclick) {
    if ($did == 5) { set %caps.offkick ON | set %caps.offkickban OFF | set %caps.offkicktban OFF } 
    if ($did == 6) { set %caps.offkick OFF | set %caps.offkickban ON | set %caps.offkicktban OFF } 
    if ($did == 7) { set %caps.offkick OFF | set %caps.offkickban OFF | set %caps.offkicktban ON } 
  }
  if ($devent == edit) && ($did == 3) { set %capskickmsg $did(3) }
}
alias capsnext {
  if (% [ $+ [ $$2 ] ] == 1) { did -c pref.caps $1 1 }
  if (% [ $+ [ $$2 ] ] == 2) { did -c pref.caps $1 2 }
  if (% [ $+ [ $$2 ] ] == 5) { did -c pref.caps $1 3 }
  if (% [ $+ [ $$2 ] ] == 10) { did -c pref.caps $1 4 }
  if (% [ $+ [ $$2 ] ] == 30) { did -c pref.caps $1 5 }
  if (% [ $+ [ $$2 ] ] == No) { did -c pref.caps $1 6 }
}
alias capskick {
  if ($nick isop $chan) { halt }
  elseif (%caps.offkick == ON) && (%bcaps [ $+ [ $nick ] ] != on) { /kick $chan $nick %capskmsg %isim | set %bcaps [ $+ [ $nick ] ] on | halt }
  elseif (%caps.offkick == ON) && (%bcaps [ $+ [ $nick ] ] == on) { capsban | halt }
  elseif (%caps.offkickban == ON) { /capsban | halt }
  elseif (%caps.offkicktban == ON) { /ban2 -u $+ %capsban $chan $nick %Bantype2 | kick $chan $nick %capskmsg %isim 1[1 %capsbantime 1 Dakika Ban 1]  $+ $colour(kick text) | halt }
  else goto nop

  :nop
}
alias capsban {
  ban2 $chan $nick %Bantype2
  kick $chan $nick %capskmsg %isim
  /unset %bcaps [ $+ [ $nick ] ] 
}   

dialog pref.advertise {
  title "OzlemCafe mIRC"
  size -1 -1 250 135
  text "( 2. Tekrarda Banla )" 1, 100 34 110 20
  box "Reklam Kick ",4, 20 15 210 82
  radio "Kick",5, 35 35 45 12, group 
  radio "Kick/Ban",6, 35 55 70 12
  radio "Zamanli Kick/Ban",7, 35 75 105 12
  combo 8, 140 70 40 120, edit, drop
  text "Dk." 9, 185 75 50 20
  button "Tamam", 200, 15 107 220 20, ok 
}
on 1:dialog:pref.advertise:*:*: {
  if ($devent == init) {
    did -a pref.advertise 8 1
    did -a pref.advertise 8 2
    did -a pref.advertise 8 5
    did -a pref.advertise 8 10
    did -a pref.advertise 8 30
    did -a pref.advertise 8 60
    advertisenext 8 advertisebantime
    if (%advertise.offkick == ON) { did -c pref.advertise 5 }
    if (%advertise.offkickban == ON) { did -c pref.advertise 6 }
    if (%advertise.offkicktban == ON) { did -c pref.advertise 7 }
  }
  %advertisebantime = $did(pref.advertise, 8).text | set %advertiseban $calc(%advertisebantime * 60)
  if ($devent == sclick) {
    if ($did == 5) { set %advertise.offkick ON | set %advertise.offkickban OFF | set %advertise.offkicktban OFF } 
    if ($did == 6) { set %advertise.offkick OFF | set %advertise.offkickban ON | set %advertise.offkicktban OFF } 
    if ($did == 7) { set %advertise.offkick OFF | set %advertise.offkickban OFF | set %advertise.offkicktban ON } 
  }
  if ($devent == edit) && ($did == 3) { set %advertisekickmsg $did(3) }
}
alias advertisenext {
  if (% [ $+ [ $$2 ] ] == 1) { did -c pref.advertise $1 1 }
  if (% [ $+ [ $$2 ] ] == 2) { did -c pref.advertise $1 2 }
  if (% [ $+ [ $$2 ] ] == 5) { did -c pref.advertise $1 3 }
  if (% [ $+ [ $$2 ] ] == 10) { did -c pref.advertise $1 4 }
  if (% [ $+ [ $$2 ] ] == 30) { did -c pref.advertise $1 5 }
  if (% [ $+ [ $$2 ] ] == No) { did -c pref.advertise $1 6 }
}
alias advertisekick {
  if ($nick isop $chan) { halt }
  elseif (%advertise.offkick == ON) && (%badvertise [ $+ [ $nick ] ] != on) { /kick $chan $nick %advertisekmsg %isim | set %badvertise [ $+ [ $nick ] ] on | halt }
  elseif (%advertise.offkick == ON) && (%badvertise [ $+ [ $nick ] ] == on) { advertiseban | halt }
  elseif (%advertise.offkickban == ON) { /advertiseban | halt }
  elseif (%advertise.offkicktban == ON) { /ban2 -u $+ %advertiseban $chan $nick %Bantype2 | kick $chan $nick %advertisekmsg %isim 1[1 %advertisebantime 1 Dakika Ban 1]  $+ $colour(kick text) | halt }
  else goto nop

  :nop
}
alias advertiseban {
  ban2 $chan $nick %Bantype2
  kick $chan $nick %advertisekmsg %isim %banned
  /unset %badvertise [ $+ [ $nick ] ] 
}   
dialog pref.Noticepro {
  title "OzlemCafe mIRC"
  size -1 -1 250 135
  text "( 2. Tekrarda Banla )" 1, 100 34 140 20
  box "Notice Korumasi",4, 20 15 210 82
  radio "Kick",5, 35 35 45 12, group 
  radio "Kick/Ban",6, 35 55 70 12
  radio "Zamanli KickBan",7, 35 75 105 12
  combo 8, 150 70 40 120, edit, drop
  text "Dak." 9, 195 75 50 20
  button "&Tamam", 200, 15 104 220 25, ok  
}
on 1:dialog:pref.Noticepro:*:*: {
  if ($devent == init) {
    did -a pref.Noticepro 8 1
    did -a pref.Noticepro 8 2
    did -a pref.Noticepro 8 5
    did -a pref.Noticepro 8 10
    did -a pref.Noticepro 8 30
    did -a pref.Noticepro 8 60
    Noticepronext 8 Noticeprobantime
    if (%Noticepro.offkick == ON) { did -c pref.Noticepro 5 }
    if (%Noticepro.offkickban == ON) { did -c pref.Noticepro 6 }
    if (%Noticepro.offkicktban == ON) { did -c pref.Noticepro 7 }
  }
  %Noticeprobantime = $did(pref.Noticepro, 8).text | set %Noticeproban $calc(%Noticeprobantime * 60)
  if ($devent == sclick) {
    if ($did == 5) { set %Noticepro.offkick ON | set %Noticepro.offkickban OFF | set %Noticepro.offkicktban OFF } 
    if ($did == 6) { set %Noticepro.offkick OFF | set %Noticepro.offkickban ON | set %Noticepro.offkicktban OFF } 
    if ($did == 7) { set %Noticepro.offkick OFF | set %Noticepro.offkickban OFF | set %Noticepro.offkicktban ON } 
  }
  if ($devent == edit) && ($did == 3) { set %Noticeprokickmsg $did(3) }
}
alias Noticepronext {
  if (% [ $+ [ $$2 ] ] == 1) { did -c pref.Noticepro $1 1 }
  if (% [ $+ [ $$2 ] ] == 2) { did -c pref.Noticepro $1 2 }
  if (% [ $+ [ $$2 ] ] == 5) { did -c pref.Noticepro $1 3 }
  if (% [ $+ [ $$2 ] ] == 10) { did -c pref.Noticepro $1 4 }
  if (% [ $+ [ $$2 ] ] == 30) { did -c pref.Noticepro $1 5 }
  if (% [ $+ [ $$2 ] ] == No) { did -c pref.Noticepro $1 6 }
}
alias Noticeprokick {
  if ($nick isop $chan) || ($nick isvo $chan) { halt }
  elseif (%Noticepro.offkick == ON) && (%bNoticepro [ $+ [ $nick ] ] != on) { /kick $chan $nick %Noticeprokmsg %isim | set %bNoticepro [ $+ [ $nick ] ] on | halt }
  elseif (%Noticepro.offkick == ON) && (%bNoticepro [ $+ [ $nick ] ] == on) { Noticeproban | halt }
  elseif (%Noticepro.offkickban == ON) { /Noticeproban | halt }
  elseif (%Noticepro.offkicktban == ON) { /ban2 -u $+ %Noticeproban $chan $nick %Bantype2 | kick $chan $nick %Noticeprokmsg %isim 1[1 %Noticeprobantime 1 Dakika Ban 1]  $+ $colour(kick text) | halt } 
  else goto nop
  :nop
}
alias Noticeproban {
  if (*serv* iswm $nick) { halt }
  ; if (Serv isin $nick) { halt }
  else {
    ban2 $chan $nick %Bantype2
    kick $chan $nick %Noticeprokmsg  %isim
    /unset %bNoticepro [ $+ [ $nick ] ] 
  }
}   

dialog pref.color {
  title "OzlemCafe mIRC"
  size -1 -1 250 135
  text "( 2. Tekrarda Banla )" 1, 100 34 110 20
  box "Renk Kick ",4, 20 15 210 82
  radio "Kick",5, 35 35 45 12, group 
  radio "Kick/Ban",6, 35 55 70 12
  radio "Zamanli Kick/Ban",7, 35 75 105 12
  combo 8, 140 70 40 120, edit, drop
  text "Dk." 9, 185 75 50 20
  button "Tamam", 200, 15 107 220 20, ok 
}
on 1:dialog:pref.color:*:*: {
  if ($devent == init) {
    did -a pref.color 8 1
    did -a pref.color 8 2
    did -a pref.color 8 5
    did -a pref.color 8 10
    did -a pref.color 8 30
    did -a pref.color 8 60
    colornext 8 colorbantime
    if (%color.offkick == ON) { did -c pref.color 5 }
    if (%color.offkickban == ON) { did -c pref.color 6 }
    if (%color.offkicktban == ON) { did -c pref.color 7 }
  }
  %colorbantime = $did(pref.color, 8).text | set %colorban $calc(%colorbantime * 60)
  if ($devent == sclick) {
    if ($did == 5) { set %color.offkick ON | set %color.offkickban OFF | set %color.offkicktban OFF } 
    if ($did == 6) { set %color.offkick OFF | set %color.offkickban ON | set %color.offkicktban OFF } 
    if ($did == 7) { set %color.offkick OFF | set %color.offkickban OFF | set %color.offkicktban ON } 
  }
  if ($devent == edit) && ($did == 3) { set %colorkickmsg $did(3) }
}
alias colornext {
  if (% [ $+ [ $$2 ] ] == 1) { did -c pref.color $1 1 }
  if (% [ $+ [ $$2 ] ] == 2) { did -c pref.color $1 2 }
  if (% [ $+ [ $$2 ] ] == 5) { did -c pref.color $1 3 }
  if (% [ $+ [ $$2 ] ] == 10) { did -c pref.color $1 4 }
  if (% [ $+ [ $$2 ] ] == 30) { did -c pref.color $1 5 }
  if (% [ $+ [ $$2 ] ] == No) { did -c pref.color $1 6 }
}
alias colorkick {
  if ($nick isop $chan) { halt }
  elseif (%color.offkick == ON) && (%bcolor [ $+ [ $nick ] ] != on) { /kick $chan $nick %colorkmsg %isim | set %bcolor [ $+ [ $nick ] ] on | halt }
  elseif (%color.offkick == ON) && (%bcolor [ $+ [ $nick ] ] == on) { colorban | halt }
  elseif (%color.offkickban == ON) { /colorban | halt }
  elseif (%color.offkicktban == ON) { /ban2 -u $+ %colorban $chan $nick %Bantype2 | kick $chan $nick %colorkmsg %isim 1[1 %colorbantime 1 Dakika Ban 1]  $+ $colour(kick text) | halt }
  else goto nop
  :nop
}
alias colorban {
  ban2 $chan $nick %Bantype2
  kick $chan $nick %colorkmsg %isim %banned
  /unset %bcolor [ $+ [ $nick ] ] 
}  

on  1:NOTICE:*:?: if (%sexi3 == ON) { if ($nick isop $comchan($nick,1)) || ($nick isop $comchan($nick,2)) || ($nick isop $comchan($nick,3)) || ($nick isop $comchan($nick,4)) || ($nick isop $comchan($nick,5)) || (*serv* iswm $nick) ||  (*global* iswm $nick) || ($nick == $me) || (*logon* iswm $nick) || (*org* iswm $nick) || (*com* iswm $nick) || (*net* iswm $nick) || (*OzlemSohbet* iswm $nick)  { halt } | ignore $wildsite | notice $nick Notice Reklam Yapma!  Engellendin ! %isim | halt }
on  1:TEXT:*sike*:?: if (%sexi1 == ON) { if ($nick isop $chan) { halt } | closemsg $nick | notice $nick ozelime Kufur Yazma ! (2 dk Engellendin) %isim | ignore -u120 $wildsite }
on  1:TEXT:*siki*:?: if (%sexi1 == ON) { if ($nick isop $chan) { halt } | closemsg $nick | notice $nick ozelime Kufur Yazma ! (2 dk Engellendin) %isim | ignore -u120 $wildsite }
on  1:TEXT:*p?c*:?: if (%sexi1 == ON) { if ($nick isop $chan) { halt } | closemsg $nick | notice $nick ozelime Kufur Yazma ! (2 dk Engellendin) %isim | ignore -u120 $wildsite }
on  1:TEXT:*anan?*:?: if (%sexi1 == ON) { if ($nick isop $chan) { halt } | closemsg $nick | notice $nick ozelime Kufur Yazma ! (2 dk Engellendin) %isim | ignore -u120 $wildsite }
on  1:TEXT:*got*:?: if (%sexi1 == ON) { if ($nick isop $chan) { halt } | closemsg $nick | notice $nick ozelime Kufur Yazma ! (2 dk Engellendin) %isim | ignore -u120 $wildsite }
on  1:TEXT:*orosp*:?: if (%sexi1 == ON) { if ($nick isop $chan) { halt } | closemsg $nick | notice $nick ozelime Kufur Yazma ! (2 dk Engellendin) %isim | ignore -u120 $wildsite }

dialog koruma_ {
  title "OzlemCafe mIRC ozele Reklam Korumasi"
  size -1 -1 173 156
  option dbu
  box "Engelle", 1, 4 4 82 105
  check "Tum Mesajlari", 2, 8 -50 50 10, 
  check "ozele Reklamlari", 3, 8 14 68 10, 
  check "Notice Korumasi", 999, 8 24 68 10, 
  list 4, 8 38 74 50, sort size vsbar hsbar
  button "Ekle", 5, 8 92 30 10,
  button "Sil", 6, 51 92 30 10,
  box "Haric", 7, 85 4 83 105
  check "Notify List", 8, 89 14 55 10, 
  check "Arkadaslarim", 9, 89 26 60 10, 
  list 10, 89 38 74 50, sort size vsbar hsbar
  button "&Ekle", 11, 90 92 30 10,
  button "&Sil", 12, 133 92 30 10,
  box "Ayarlar", 13, 4 105 164 47
  check "Red Mesaji Yolla", 14, 208 114 55 10, 
  check "Red Edilen Mesaji @Red Penceresinde Goster", 16, 8 116 120 10, 
  check "Oplar Haric", 88, 8 130 80 10, 
  button "Tamam", 17, 95 130 30 12, ok 
  button "Vazgec", 18, 130 130 30 12, cancel 
}
on *:dialog:koruma_:*:*:{
  if ($devent == init) {
    if (%sexi3 == ON) { did -c $dname 999 }
    if ($readini($mb,block,all)) { did -c $dname 2 }
    if ($readini($mb,block,isin)) { did -c $dname 3 }
    .udlist_ 4 block words
    if ($readini($mb,exempt,notify)) { did -c $dname 8 }
    did $iif($readini($mb,exempt,ops) == 1,-c,-u) $dname 88
    if ($readini($mb,exempt,list)) { did -c $dname 9 }
    .udlist_ 10 exempt friends
    if ($readini($mb,options,reject)) { did -c $dname 14 }
    if ($readini($mb,options,echo)) { did -c $dname 16 }
    did -f $dname 17
  }
  if ($devent == sclick) {
    if ($did == 999) {
      if (%sexi3 == ON) { /set %sexi3 OFF | /echo -a 0,2 Noticeler Dahil Degil | halt }
      if (%sexi3 == OFF) { /set %sexi3 ON | /echo -a 0,2 Noticeler Dahil Edildi | halt }
    }
    if ($did == 2) && ($did(2).state == 1) { did -u $dname 3 }
    if ($did == 3) && ($did(3).state == 1) { did -u $dname 2 }
    if ($did == 5) {   
      var %t = $?="Eklenicek Karakter (Yazi) $crlf "
      if ($numtok(%t,32) > 1) { %t = $replace(%t,$chr(32),$chr(160)) }
      .writeini $mb block words $iif($readini($mb,block,words),$+($ifmatch,$chr(44),%t),%t)
      udlist_ 4 block words
    }
  }
  if ($did == 6) {
    var %tmp = $did(4).seltext
    if (%tmp) {
      if ($remtok($readini($mb,block,words),%tmp,44)) { 
        .writeini $mb block words $ifmatch 
      }
      else .remini $mb block words
      .udlist_ 4 block words
    }
  }
  if ($did == 11) {
    var %t = $$?="Eklenicek Nick $crlf "
    if ($chr(32) !isin %t) {
      .writeini $mb exempt friends $iif($readini($mb,exempt,friends),$+($ifmatch,$chr(44),%t),%t)
      udlist_ 10 exempt friends
    }
  }
  if ($did == 12) {
    var %tmp = $did(10).seltext
    if (%tmp) {
      if ($remtok($readini($mb,exempt,friends),%tmp,44)) { 
        .writeini $mb exempt friends $ifmatch 
      }
      else .remini $mb exempt friends
      .udlist_ 10 exempt friends
    }
  }
  if ($did == 17) {
    .writeini $mb block all $iif($did(2).state == 1,$true,$false)
    .writeini $mb block isin $iif($did(3).state == 1,$true,$false)
    .writeini $mb exempt ops $did(88).state
    .writeini $mb exempt notify $iif($did(8).state == 1,$true,$false)
    .writeini $mb exempt list $iif($did(9).state == 1,$true,$false)
    .writeini $mb options reject $iif($did(14).state == 1,$true,$false)
    .writeini $mb options echo $iif($did(16).state == 1,$true,$false)
  }
}
alias -l udlist_ {
  var %a = 1
  did -r $dname $1
  while ($gettok($readini($mb,$2,$3),%a,44)) {
    did -az $dname $1 $ifmatch
    inc %a
  }
}
alias -l match_text {
  var %i = $numtok($readini($mb,block,words),44),%moonman
  while (%i > 0) {
    %moonman = $+(*,$replace($gettok($readini($mb,block,words),%i,44),$chr(160),$chr(32)),*) 
    if (($wildtok($strip($1-,burc),%moonman,1,44)) ||  isin $1-) ||  isin $1-) ||  isin $1-) {
      return $true
    }
    dec %i
  }
}
alias -l isfriend {
  var %i = $numtok($readini($mb,exempt,friends),44),%j
  while (%i > 0) {
    %j = $gettok($readini($mb,exempt,friends),%i,44)
    if (%j iswm $mask($fulladdress,5)) || ($1 == %j) { return $true }
    dec %i
  }
  return $false
}

alias -l block {
  var %i,%j
  if ($isfriend($1)) && ($readini($mb,exempt,list)) { %i = $true }
  if ($1 isnotify) && ($readini($mb,exempt,notify)) { %j = $true }
  if (($1 isop $comchan($me,1)) ||  ($1 isop $comchan($me,2)) || ($1 isop $comchan($me,3))) && ($readini($mb,exempt,ops) == 1) { %j = $true }
  if (%i) || (%j) { return $false }
  else { return $true }
}
alias koruma dialog $iif($dialog(koruma_),-v,-m) koruma_ koruma_
on ^*:open:?:{
  if ($readini($mb,block,all)) {
    if ($block($nick)) {
      if ($readini($mb,options,reject)) { .notice $nick $readini($mb,options,notice) }
      if ($readini($mb,options,echo)) { window -en @Red | echo -t @Red $pre Red edilenler: 0,2 $+ $nick $+ : $1- }
      if ($readini($mb,options,ignore)) { .ignore $+(-pu,$readini($mb,options,secs)) $nick 2 }
      haltdef
    }
  }
  elseif ($readini($mb,block,isin)) && ($match_text($1-)) {
    if ($block($nick)) {
      if ($readini($mb,options,reject)) { .notice $nick ozelime Reklam Yapma. Mesaj Reddedildi, 2 dk Engellendin! %isim | ignore -u120 $wildsite }
      if ($readini($mb,options,echo)) { window -en @Red | echo -t @Red $pre 4[Red Mesajlari]:  $+ $nick $+  ( $+ $address $+ ) : $1- }
      if ($readini($mb,options,ignore)) { .ignore $+(-pu,$readini($mb,options,secs)) $nick 2 }
      haltdef
    }
  }
}
alias -l mb return $+(",$scriptdirkoruma.ini,")
menu @Red {
  Ekrani Temizle:clear
  Ekrani Kapat:window -c @Red
}
