Coders-IRC


IRC for Coders

Log Viewer


image

menu status,channel { 
  Log Viewer: 
  .Default: $LogViewer(D)
  .Channels: $LogViewer(C) 
  .Query/PM: $LogViewer(Q) 
  .@Windows: $LogViewer(@) 
}
alias LogViewer {
  $iif(!$window(@LogViewer),window -CkSzl20 @LogViewer $mircexe)
  dline @LogViewer $+(1-,$line(@LogViewer,0,0))
  dline -l @LogViewer $+(1-,$line(@LogViewer,0,1))
  renwin @LogViewer @LogViewer $chr(160)
  if ($1 = D) { noop $qt($findfile($logdir,*.log,@LogViewer,aline -l @LogViewer $nopath($1-))) }
  if ($1 = C) { noop $qt($findfile($logdir,#*.log,@LogViewer,aline -l @LogViewer $nopath($1-))) }
  if ($1 = @) { noop $qt($findfile($logdir,@*.log,@LogViewer,aline -l @LogViewer $nopath($1-))) }
  if ($1 = Q) { 
    var %t 1
    while (%t <= $findfile($logdir,*.log,0)) {
      aline -l @logViewer $nopath($findfile($logdir,*.log,%t)) | inc %t
    }
    dline -l @LogViewer 1- $+ $calc($fline(@LogViewer,@*,1,1)-1)
    dline -l @LogViewer 1- $+ $fline(@LogViewer,@*,0,1)
  }
}
menu @LogViewer {
  dclick {
    if ($sline(@LogViewer,1)) { 
      renwin @LogViewer @LogViewer $& 
        - Log File: $gettok($sline(@LogViewer,1),1--3,46) $&
        - Network: $gettok($sline(@LogViewer,1),-2,46) $&
        - Size: $bytes($file($qt($findfile($logdir,$sline(@LogViewer,1),1))).size).suf
      .loadbuf -rip @LogViewer $qt($findfile($logdir, $+ $sline(@LogViewer,1) $+ *,1)) 0
    }
  }
  Delete Log: { 
    if ($input(Want to delete $sline(@LogViewer,1),uy,Log File Delete)) {  
      if ($input(Are you sure you want to delete $sline(@LogViewer,1),y,Log File Delete Confirming)) { 
        .remove -b $qt($+($logdir,$sline(@LogViewer,1)))
        noop $input(Moving $sline(@LogViewer,1) to Recycle Bin. $crlf and $crlf Updating @LogViewer to Default view.,ok2,Log File Delete Confirmation)
        $LogViewer(D)
      }
    }
  }
  Reset:
  .Display: { dline @LogViewer $+(1-,$line(@LogViewer,0,0)) | renwin @LogViewer @LogViewer $chr(160) }
  .List:
  ..Default: $LogViewer(D) | noop $input(Reseting @LogViewer to Default view.,ok2,@LogViewer Reset)
  ..Channels: $LogViewer(C) | noop $input(Reseting @LogViewer to Channel view.,ok2,@LogViewer Reset)
  ..Query/PM: $LogViewer(Q) | noop $input(Reseting @LogViewer to Query/PM view.,ok2,@LogViewer Reset)
  ..@Windows: $LogViewer(@) | noop $input(Reseting @LogViewer to @Windows view.,ok2,@LogViewer Reset) 
  Search: 
  .Display: { $LogViewerSearch($remove($$?="Search term",$chr(32)),D) }
  .List: { $LogViewerSearch($remove($$?="Search term",$chr(32)),L) }
  Stats { 
    dline @LogViewer $+(1-,$line(@LogViewer,0,0)) | renwin @LogViewer @LogViewer $chr(160)
    var %Channels $fline(@LogViewer,$chr(35) $+ *,0,1) | var %@Windows $fline(@LogViewer,$chr(64) $+ *,0,1)
    var %Others $calc($findfile($logdir,*.log,0) - $calc(%Channels + %@Windows))
    echo -a 12[!]4 There are currently 12 $+ %Channels 4Channel log files 12[!]
    echo -a 12[!]4 There are currently 12 $+ %@Windows 4@Window log files 12[!]
    echo -a 12[!]4 There are currently 12 $+ %Others 4PM/Other log files 12[!] 
    echo -a 12[!]4 There are currently 12 $+ $findfile($logdir,*.log,0) 4Total log files 12[!]
  }
}
alias -l LogViewerSearch { 
  if ($1 && $isid) {
    if ($2 = D) {
      window -znk0 @LogViewerSearch $mircexe
      filter -wwcpz @LogViewer @LogViewerSearch * $+ $1 $+ *
      renwin @LogViewerSearch @LogViewerSearch $& 
        - Log File: $gettok($sline(@LogViewer,1),1--3,46) $&
        - Network: $gettok($sline(@LogViewer,1),-2,46) $&
        - Search Term: $1
      if ($filtered < 1) { 
        noop $input(Searched: $qt($1) $crlf Results: 0,ok2,@LogViewer Search Result) 
        .timer 1 2 window -c @LogViewerSearch 
      }
    }
    if ($2 == L) { 
      filter -wwcpzlL @LogViewer @LogViewer * $+ $1 $+ *
      if ($filtered < 1) { 
        noop $input(Searched: $qt($1) $crlf Results: 0 $crlf and $crlf Updating @LogViewer to Default view.,ok2,@LogViewer Search Result) 
        $LogViewer(D)
      }
    }
  }
}

Expand


Read More

TinyURL converter


image

alias tinyurl {
  var %c $iif($isid,return,echo -a)
  if ($1) && (!$com(u)) && (!$sock(tinyurl)) {
    if ($regex($1,/^(?:(?:f|ht)tps?:\/\/|[^<>\/:\s])+[^<>.:\/\s]+(?:\.[^\/:<>.\s]{2,6})+(?:\/.*?)?$/i)) {
      sockopen tinyurl www.tinyurl.com 80
      sockmark tinyurl /create.php?url= $+ $remove($1-,$chr(32))
      .comopen u Wscript.Shell
      .comclose u $com(u,run,1,bstr*,$(%comspec%,) /c ping.exe -n 2 127.0.0.1 >nul,uint,0,bool,true)
      %c $iif(%tinyurl,$v1,No result.) 
    }
    else %c Invalid URL!
  }
  else %c $iif($1,Please be patient...,Input a URL!)
}
on *:sockopen:tinyurl: {
  if ($sockerr) {
    set -u3 %tinyurl Error connecting: $sock($sockname).wsmsg
    sockclose $sockname
  }
  else {
    sockwrite -n $sockname GET $sock($sockname).mark HTTP/1.1
    sockwrite -n $sockname Host: tinyurl.com
    sockwrite -n $sockname User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8)
    sockwrite -n $sockname $crlf
  }
}
on *:sockread:tinyurl: {
  if ($sockerr) {
    set -u3 %tinyurl Error connecting: $sock($sockname).wsmsg
    sockclose $sockname
  }
  else {
    var %x
    sockread %x
    if ($regex(%x,/<blockquote><b>(.*?)<\/b><br>/)) {
      set -u3 %tinyurl $regml(1)
      sockclose $sockname
    }
  }
}
on $*:TEXT:/^[.!@]tiny(url)? .*?$/Si:#: {
  if (!%tinyurl. [ $+ [ $2 ] ]) {
    var %c = $tinyurl($2) 
    msg $chan $iif(error !isin %c && invalid !isin %c,TinyURL converted: %c $+([,From $len($2) to $len(%c) chars,]),%c)
    set -u5 %tinyurl. $+ $2 1
  }
}

Expand


Read More

Hızlı Badnick korumasi (Debug sistem)


image

alias badnick {
  var %1 $gettok($1-,1,32)
  if ($1 == on) { .debug -i on badnick | echo 4 -ea  Badnick korumasi acildi. }
  if ($1 == off) { .debug -i off badnick | echo 4 -ea  Badnick korumasi kapatildi }
  if ($1 == ekle) {
    if $ulist($2,bad,1) { echo -ea $2 zaten ekli | return }
    echo -ea $2 badnick eklendi.
    .auser bad $2
  }
  if ($1 == sil) {
    if !$ulist($2,bad,1) { echo -ea $2 zaten listede yok | return }
    echo -ea $2 listeden silindi.
    .ruser bad $2
  }
  if %1 = <- -b="" 1="" 32="" 4badnick="" 4mask:="" addtok="" adnick="" alias="" ani-ac="" ask="" b="" bad="" badnick="" chan="" echo="" gettok="" girisi:="" girisi="" host="" hotline="" hotlink:="" i="" ident="" if="" inc="" join="" kick="" level="" mask="" maskbul="" me="" mode="" nick="" oh="" on="" pre="" regex="" regml="" return="" right="" strip="" token="" tokenize="" ulist="" v1="" var="" while="" x="" yasak.="">

Expand


Read More