[script]
n0=:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
n1=:::::               XcLusive Script                       :::::
n2=:::::               Log Viewer Add-on                     :::::
n3=:::::               HaLiL@AhKalbim.Net                    :::::
n4=:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
n5=alias blog dialog -mr blog blog
n6=dialog blog {
n7=  title "Log Okuyucu"
n8=  size 183 106 472 437
n9=  option pixels
n10=  icon $mircdirikon\logs.ico, 0
n11=  list 1, 10 20 269 401, size
n12=  box "Ara:", 2, 287 15 168 172
n13=  edit "", 4, 298 45 145 23, multi return
n14=  edit "", 7, 298 125 145 23, multi return
n15=  box "Bilgiler:", 9, 287 193 168 102
n16=  text "Kayıt Tarihi:", 10, 294 209 111 13
n17=  text "Son Değişiklik Zamanı:", 11, 294 234 153 13
n18=  text "Dosya Boyutu:", 12, 294 258 156 13
n19=  box "Tercih:", 13, 287 299 168 121
n20=  text "", 14, 294 222 153 13
n21=  text "", 15, 294 246 151 13
n22=  text "", 16, 294 272 151 13
n23=  button "Ara", 26, 333 73 80 27, flat
n24=  text "Nick / Kanal (.log)", 21, 298 28 149 16
n25=  button "Ara", 22, 333 151 80 27, flat
n26=  text "Yazılarda Ara", 8, 298 107 147 16
n27=  button "Oku", 17, 333 312 80 27, flat
n28=  button "Sil", 18, 333 350 80 27, flat
n29=  button "Kapat", 19, 333 387 80 27, flat cancel
n30=  box "XcLusive Script Log Okuyucu", 20, 4 4 460 427
n31=  check "", 3, 418 76 21 20, hide
n32=  check "", 6, 419 156 21 20, hide
n33=}
n34=
n35=on *:dialog:blog:sclick:17:{  window @log | loadbuf -rp @log $+(",%blog.dir,$$did(blog,1,$did(blog,1).sel).seltext,") }
n36=on *:dialog:blog:sclick:18:{ .remove $+(",%blog.dir,$$did(blog,1,$did(blog,1).sel).seltext,") | did -d blog 1 $did(blog,1).sel }
n37=on *:dialog:blog:sclick:26:{ did -u $dname 6 | did -c $dname 3 | logoku }
n38=on *:dialog:blog:sclick:22:{ did -u $dname 3 | did -c $dname 6 | logoku }
n39=alias logoku {
n40=  if ($did(3).state == 1) || ($did(6).state == 1) {
n41=    if ($did(3).state == 1) {
n42=      set %blog.nome $+($as1($did(blog,4)).log)
n43=    }
n44=    else {
n45=      set %blog.nome *.log
n46=    }
n47=    if ($did(6).state == 1) {
n48=      set %blog.text $as1($did(blog,7))
n49=    }
n50=    else {
n51=      set %blog.text *
n52=    }
n53=    blog.findfile1 
n54=    halt
n55=  }
n56=  echo $color(info) -ta Arama Yapılması İçin Seçenek Kutusuna Tıklayınız
n57=}
n58=on *:dialog:blog:init:*:{
n59=  set %blog.dir $logdir
n60=  blog.finddir
n61=  idset 26
n62=  dll $mdx SetColor $dname 10,11,12 text $rgb(0,70,213)
n63=}
n64=on *:dialog:blog:sclick:1:{
n65=  if (*.log iswm $did(blog,1,$did(blog,1).sel).seltext) {
n66=    did -r blog 14,15,16
n67=    var %blog.arquivo $+(%blog.dir,$did(blog,1,$did(blog,1).sel).seltext)
n68=    did -a blog 14 $asctime($file(%blog.arquivo).ctime)
n69=    did -a blog 15 $asctime($file(%blog.arquivo).mtime)
n70=    did -a blog 16 $bytes($file(%blog.arquivo),k).suf
n71=  }
n72=}
n73=
n74=on *:dialog:blog:dclick:1:{
n75=  if (*.log !iswm $did(blog,1,$did(blog,1).sel).seltext) {
n76=    did -r blog 14,15,16
n77=    if ($left($right($did(blog,1,$did(blog,1).sel).seltext,-1),-1) == ..) && ($did(blog,1).sel == 1) {
n78=      if (!%blog.busca) {
n79=        var %blog1 $wildtok(%blog.dir,*,0,92) 
n80=        var %blog3 [ $+(1-,[ [  $calc(%blog1 - 1) ] ]) ]
n81=        var %blog2 $+($gettok(%blog.dir,[ [ %blog3 ] ],92),\)
n82=        set %blog.dir [ %blog2 ]   
n83=        did -r blog 1 
n84=        blog.finddir
n85=        halt
n86=      }
n87=      did -r blog 1
n88=      unset %blog.busca
n89=      blog.finddir
n90=      halt
n91=    }
n92=    set %blog.dir $+(%blog.dir,$left($right($did(blog,1,$did(blog,1).sel).seltext,-1),-1),\)
n93=    did -r blog 1
n94=    blog.finddir
n95=    halt
n96=  }
n97=  window @log
n98=  loadbuf -rp @log $+(%blog.dir,$did(blog,1,$did(blog,1).sel).seltext)
n99=}
n100=alias as1 {
n101=  if ($1) {
n102=    if ($left($1,1) == *) {
n103=      var %r $1-
n104=      goto 2
n105=    }
n106=    var %r $+(*,$1-)
n107=    :2
n108=    if ($right($1-,1) == *) {
n109=      var %r [ %r ]
n110=      goto 3
n111=    }
n112=    var %r $+(%r,*)
n113=    :3
n114=    return %r
n115=  }
n116=  return *
n117=}
n118=
n119=alias blog.findfile1 {
n120=  did -r blog 1
n121=  window -hs @logview
n122=  window -hs @logview1
n123=  set %blog 0
n124=  :comeco
n125=  inc %blog
n126=  tokenize 32 $findfile(%blog.dir,%blog.nome,%blog)
n127=  var %blog1 $wildtok($1-,*,0,92) 
n128=  var %blog3 $+(1-,[ [  $calc(%blog1 - 1) ] ])
n129=  var %blog2 $+($gettok($1-,[ [ %blog3 ] ],92),\)
n130=  if (%blog2) {
n131=    if (%blog2 == %blog.dir) && (%blog.text != *) {
n132=      filter -p $+(",$1-,") @logview1 %blog.text
n133=      if ($filtered) {
n134=        did -r blog 1
n135=        aline @logview $remove($1,%blog.dir)
n136=        goto comeco
n137=      }
n138=      goto comeco
n139=    }
n140=    if (%blog2 == %blog.dir) {
n141=      aline @logview $remove($1,%blog.dir)
n142=      goto comeco
n143=    }
n144=  }
n145=  if ($line(@logview,1)) {
n146=    set %blog 1
n147=    did -a blog 1 [..]
n148=    while ($line(@logview,%blog)) {
n149=      did -a blog 1 $line(@logview,%blog)
n150=      inc %blog
n151=    }
n152=  }
n153=  else {
n154=    did -a blog 1 [..]
n155=    did -a blog 1 No file was found
n156=  }
n157=  set %blog.busca CURIOSO!!!
n158=  window -c @logview1
n159=  window -c @logview
n160=}
n161=alias blog.finddir {
n162=  var %blog 0 
n163=  if (%blog.dir != $logdir) {
n164=    did -a blog 1 [..]
n165=  }
n166=  :comeco
n167=  inc %blog
n168=  tokenize 32 $finddir(%blog.dir,*,%blog)
n169=  var %blog1 $wildtok($1-,*,0,92) 
n170=  var %blog3 $+(1-,[ [  $calc(%blog1 - 1) ] ])
n171=  var %blog2 $+($gettok($1-,[ [ %blog3 ] ],92),\)
n172=  if (%blog2 == %blog.dir) {
n173=    did -a blog 1 $+([,$remove($1-,%blog.dir),])
n174=    goto comeco
n175=  }
n176=  blog.findfile
n177=}
n178=alias blog.findfile {
n179=  window -sh @logview
n180=  var %blog 0 
n181=  :comeco
n182=  inc %blog
n183=  tokenize 32 $findfile(%blog.dir,*.log,%blog)
n184=  var %blog1 $wildtok($1-,*,0,92) 
n185=  var %blog3 $+(1-,[ [  $calc(%blog1 - 1) ] ])
n186=  var %blog2 $+($gettok($1-,[ [ %blog3 ] ],92),\)
n187=  if (%blog2 == %blog.dir) {
n188=    aline @logview $remove($1-,%blog.dir)
n189=    goto comeco
n190=  }
n191=  var %blog 1
n192=  while ($line(@logview,%blog)) {
n193=    did -a blog 1 $line(@logview,%blog)
n194=    inc %blog
n195=  }
n196=  window -c @logview
n197=}
