lookjapan.COM - IRC ve mIRC dünyasının forumu!

lookjapan.COM - IRC ve mIRC dünyasının forumu! (http://www.lookjapan.com/index.php)
-   TCL Scriptler (http://www.lookjapan.com/forumdisplay.php?f=69)
-   -   Not sistem tcl (http://www.lookjapan.com/showthread.php?t=2670)

Anti 03 Kasım 2015 22:21

Not sistem tcl
 
kod belli bir kişiye bot aracılığıyla not göndermek içindir.
MemoServ gibi çalışır.eggdrop notes modülünü kullanır.
botunuzun kullanıcı listesinde ekli olanlar faydalanabilir.
kod açıklamalarını kullanmadan önce okuyunuz.

komutlar:

.ekle rumuz notunuz buraya gelecek.( belirlediğiniz rumuza notunuzu gönderir)
.sil not-no (notunuzu siler not nosu ile)
.liste (varsa notları listeler)
.not [notunuz olup olmadığını kontrol eder. varsa şu kadar notunuz var der)
Kod:

# kodu kullanabilmek için notes modulü yüklü olmalı.bu modülle ilgili ayarlar .conf üzerinde olmalı.
# hangi kanal üstünde komutlar kullanılmak isteniyorsa: .chanset #kanal +usenotes
# not sistemi botun kullanıcı siteminde ekli olan kullanıcılar tarafından, yani
# bot tarafından tanınan kullanıcılar tarafından kullanılabilir.
# kullanıcı eklemek için: .+user rumuz hostu
# hostmaskı değişirse bot kullanıcıyı tanıyamayabilir. bu durumda yeni değişen host:
# .+host rumuz  yeni/diğer-hostmask
# botun kullanıcı dosyasına eklediğiniz bu kullanıcı için flag eklemek için:
# .chattr rumuz +/-flag 
# belli bir kanal üstünde kullanıcı flagı eklemek:
# .chattr rumuz +/-flag #kanal
# örnek: .chattr ayshe f|o #kanalim
# yukardaki örneğin anlamı : kullanıcı ayshe #kanalim'da kanal opu,global(botun olduğu kanallar) genelinde arkadaş.
# eggdrop kullanıcı flag listesi:  [Üye Olmadan Linkleri Göremezsiniz. Üye Olmak için TIKLAYIN...]
# .help +user - .help +host - .help chattr
# notes modulü ayarları hakkında: .conf üzerinde loadmodule notes ile modül yüklenmeli.
# set notefile "LamestBot.notes" : notların saklandığı dosya adı.
# set max-notes 50 :herbir kullanıcı için saklanacak maksimum not adeti
# set note-life 60 : notlar teslim edilene dek en çok kaç "gün" saklanmalı.
# set allow-fwd 0 : notlar başka bir hesabınıza yönlendirilsin mi(varsa) 0:hayır 1:evet
# set notify-users 0 :ayar 1 olursa not gönderilen kişiye notunuz var uyarısı saatte bir yapılır.(notice olarak)
# set notify-onjoin 1 :not gönderilen kişi giriş yaptığında notun var bildirisi yapılır (notice olarak)
# kod yapımcısı : speechles (Ukiah-California/USA): yapım tarihi : 10.06.2013
bind pub - .not notes::total
bind pub - .liste notes::list
bind pub - .sil notes::erase
bind pub - .ekle notes::store
setudef flag usenotes
namespace eval notes {
 proc total {n u h c t} {
  if {![channel get $c usenotes]} { return }
  set total[listnotes $h -]
  switch -- $total {
  -1 { putserv "privmsg $c :$n, bot'un kullanıcı listesinde yoksunuz.bu nedenle bu sistemi kullanamazsınız." }
  -2 { putserv "privmsg $c :$n, not dosyası hatası.. Lütfen $::owner ile iletişime geçin!" }
  0  { putserv "privmsg $c :$n, notunuz yok." }
  default  {
    set out "privmsg $c :$n, hafızamda [llength $total] adet notunuz var."
    if {[llength $total] > 0} { append out " kullanım: .liste ile bunları görebilirsiniz." }
    putserv "$out"
  }
  }
 }
 proc list {n u h c t} {
  if {![channel get $c usenotes]} { return }
  if {![string length [string trim $t]]} { set t "-" }
  set total[listnotes $h $t]
  switch -- $total {
  -1 { putserv "privmsg $c :$n, bot'un kullanıcı listesinde yoksunuz.bu nedenle bu sistemi kullanamazsınız." }
  -2 { putserv "privmsg $c :$n, not dosyası hatası.. Lütfen $::owner ile iletişime geçin!" }
  0  { putserv "privmsg $c :$n, notunuz yok. ( $t )" }
  default {
    if {[llength $total] < 1} {
    putserv "privmsg $c :$n, listemde notunuz yok."
    return
    }
    foreach row $total {
    foreach {from timestamp text} [lindex [notes $h $row] 0] { break }
    putserv "privmsg $c :$n, $row) <$from> $text ( [duration [expr {[clock seconds] - $timestamp }]] evvel eklenmiş )"
    }
  }
  }
 }
 proc store {n u h c t} {
  if {![channel get $c usenotes]} { return }
  set target [lindex [split $t] 0]
  set note [join [lrange [split $t] 1 end]]
  if {![string length $target]} {
  putserv "privmsg $c :$n, not eklemek için bir nick belirtmelisiniz.  kullanımı: $::lastbind <rumuzu> <göndermek istediğiniz not>"
  return
  }
  if {![string length $note]} {
  putserv "privmsg $c :$n, sadece rumuz değil, göndermek istediğiniz  notuda yazmalısınız. kullanımı: $::lastbind <rumuzu> <göndermek  istediğiniz not>"
  return
  }
  set total [storenote $h $target $note 0]
  switch -- [validuser $target] {
  1  { putserv "privmsg $c :$n, kaydedildi.notunuz $target kullanıcısına bildirilecek." }
  default { putserv "privmsg $c :$n, göndermek istediğiniz $target hatalı. böyle biri kullanıcı listemde yok!" }
  }
 }
 proc erase {n u h c t} {
  if {![channel get $c usenotes]} { return }
  if {![string length [string trim $t]]} { set t "-" }
  set total [erasenotes $h $t]
  switch -- $total {
  -1 { putserv "privmsg $c :$n, bot'un kullanıcı listesinde yoksunuz.bu nedenle bu sistemi kullanamazsınız." }
  -2 { putserv "privmsg $c :$n, not dosyası hatası.. Lütfen $::owner ile iletişime geçin!" }
  0  { putserv "privmsg $c :$n, silinecek notunuz bulunmuyor. ( $t )" }
  default { putserv "privmsg $c :$n, işlem tamam. $total adet notunuz silindi. ( $t )" }
  }
 }
}

Kod yazarı: saywhat


All times are GMT +3. The time now is 22:28.

Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.