on *:text:*:#mirchelp:{
  if $regex($1,/^((!|\.)haz(i|)r(k|c)o(d(s|)|de(s|))|(!|\.)(c|k)ode(s|ler|))$/i)  {
    if !$isdir(Hcodes) {
      msg $chan 2Veritabanmda kodlarn depolanaca klasr yok.
      msg $chan 2Klasr oluturuluyor....
      mkdir Hcodes
      .halt
    }
    elseif  $findfile(Hcodes,*.txt,0) == 0 {
      msg $chan 2Veritabanma kod eklenmemitir.
      .halt
    }
    else {
      msg $chan 2Kod bankasndaki hazrkodlar10 $qt($findfile(Hcodes,*.txt,0)) 2tane listesi -;
      msg $chan 2Kod eklemek iin !ekle Kodad , silmek iin !kaldr kodNumaras;
      msg $chan 2Kod grntlemek iin  !goster KodNumaras;
      msg $chan 4Not : 2Kendi kodunuzu arivimize ekletmek iin ltfen kanal yneticileri ile grnz.
      var %1 1
      while %1 <= $findfile(Hcodes,*.txt,0) {
        msg $chan 2 %1 $+ ) 10 $remove($nopath($findfile(Hcodes,*.txt,%1)),.txt)
        inc %1
      }
    }
  }
  if $1 == !ekle && %aktarim != $nick {
    if $nick isop $chan {
      if !$2 {
        msg $chan 2Komut kullanm 10!ekle KodunAd 2eklinde olmal ve Trke harf iermemelidir!
        .halt 
      }
      else {
        set %kod $2
        set %aktarim $nick
        msg $chan 10 $nick ; 2veritabannda kodunuz iin yer ald. Kodunuzu kanala pasteleyin.
        write Hcodes/ $+ %kod $+ .txt Tarih: $date / $time , Kod sahibi: $nick
        .halt
      }
    }
  }
  if %aktarim == $nick && $1 != !bitir  {
    if $nick isop $chan {
      write Hcodes/ $+ %kod $+ .txt $1-
    }
  }
  if %aktarim == $nick && $1 == !bitir {
    if $nick isop $chan {
      unset %aktarim
      unset %kod
      msg $chan 10 $nick , 2kodunuz sistemime eklenmitir. Liste iin: !hazrcode , kodunuzu grmek iin: !goster kodNumaras
      .halt
    }
  }
  if $1 == !kaldr && $nick isop $chan && $2 {
    if $nick isop $chan {
      msg $chan 10 $nopath($findfile(Hcodes,*.txt,$2)) 2 adl kod veritabanmdan kaldrld.
      remove $shortfn($findfile(Hcodes,*.txt,$2))
    }
  }
  if $1 == !goster && $2 {
    msg $chan 10 $nopath($findfile(Hcodes,*.txt,$2)) 2kanala 100ms ile oynatlyor.
    set %path $+(Hcodes/,$nopath($findfile(Hcodes,*.txt,$2)))
    play $chan %path 100 
  }
}

on *:join:#mIRCHelp: {
  .notice $nick Client & mIRC Scripting yardim kanal #mIRCHelp 'e hos geldiniz.
  .notice $nick HazrKod Listesine ulasmak icin, kanalda !Hazrcode komutunu uygulayin.
  .notice $nick Listemizde bulunmayan bir kod hakknda yardm almak iin ise sorunuzu kanal geneline ak ve net bir ekilde yaznz.
}
