;Xc Renkli Yazı ve Koruma Sistemi
;Coded by HaLiL
alias renkk dialog -m renkk renkk
dialog renkk {
  title "XcLusive Script"
  size -1 -1 209 150
  option dbu
  icon $mircdirikon\5.ico, 0
  box "Renk Koruma Ayarları", 1, 5 5 198 118
  text "Ban Tipi:", 2, 12 66 50 8
  text "Ban Süresi:", 3, 12 79 50 8
  text "Kick Mesajı:", 8, 12 94 41 8
  edit "", 9, 57 93 129 10, autohs
  button "Kapat", 10, 57 129 45 15, cancel
  button "Kaydet", 11, 109 129 45 15
  combo 12, 69 78 90 52, size drop
  combo 13, 69 65 90 52, size drop
  text "Uyarı Mesajı:", 14, 12 107 45 8
  edit "", 15, 57 106 129 10, autohs
  check "", 16, 12 16 9 10, flat
  text "Reverse (Control+R)", 17, 23 17 100 8
  check "", 18, 12 28 9 10, flat
  text "Renk Koruması (Control+K)", 19, 23 29 100 8
  check "", 20, 12 40 9 10, flat
  text "Kalın Yazı Koruması (Control+B)", 21, 23 41 118 8
  check "", 22, 12 52 9 10, flat
  text "AltÇizgili Yazı Koruması (Control+U)", 23, 23 53 128 8
}
alias renkbak {
  if ($group(#reverse) == on) set %renkkick on
  if ($group(#renk) == on) set %renkkick on
  if ($group(#bold) == on) set %renkkick on
  if ($group(#underline) == on) set %renkkick on
}
alias rkickk {
  .disable #renk
  .disable #reverse
  .disable #bold
  .disable #underline
}
alias rkicka {
  .enable #renk
  .enable #reverse
  .enable #bold
  .enable #underline
}
on 1:dialog:renkk:*:*:{
  if $devent == init {
    idset 23
    bantype
    bansaniye
    did -c $dname 13 $x3(renkset,btype)
    did -c $dname 12 $x3(renkset,bsecs)
    did -a $dname 9 $x3(renkset,kmsg)
    did -a $dname 15 $x3(renkset,umsg)
    if ($group(#reverse) == on) did -c $dname 16
    if ($group(#renk) == on) did -c $dname 18
    if ($group(#bold) == on) did -c $dname 20
    if ($group(#underline) == on) did -c $dname 22
  }
  if $devent == sclick {
    if $did == 12 { set %did12sel $did(12).sel }
    if $did == 13 { set %did13sel $did(13).sel }
    if $did == 11 { 
      if ($did(18).state == 1) { .enable #renk }
      else { .disable #renk }
      if ($did(16).state == 1) { .enable #reverse }
      else { .disable #reverse }
      if ($did(20).state == 1) { .enable #bold }
      else { .disable #bold }
      if ($did(22).state == 1) { .enable #underline }
      else { .disable #underline }
      set %dialogtitle Renk Koruma | tfsave2 renkset
    }
  }
}
#renk off
on @1:text:**:#:{
  tfkick $chan $nick kmsg umsg renkset
}
on @1:action:**:#:{
  tfkick $chan $nick kmsg umsg renkset
}
on @1:notice:**:#:{
  tfkick $chan $nick kmsg umsg renkset
}
#renk end
#reverse off
on @1:text:**:#:{
  tfkick $chan $nick kmsg umsg renkset
}
on @1:action:**:#:{
  tfkick $chan $nick kmsg umsg renkset
}
on @1:notice:**:#:{
  tfkick $chan $nick kmsg umsg renkset
}
#reverse end
#bold off
on @1:text:**:#:{
  tfkick $chan $nick kmsg umsg renkset
}
on @1:action:**:#:{
  tfkick $chan $nick kmsg umsg renkset
}
on @1:notice:**:#:{
  tfkick $chan $nick kmsg umsg renkset
}
#bold end
#underline off
on @1:text:**:#:{
  tfkick $chan $nick kmsg umsg renkset
}
on @1:action:**:#:{
  tfkick $chan $nick kmsg umsg renkset
}
on @1:notice:**:#:{
  tfkick $chan $nick kmsg umsg renkset
}
#underline end
