IRCForumu.Net - Türkiye'nin IRC ve mIRC Kullanıcılarının Buluştuğu Forum

IRCForumu.Net - Türkiye'nin IRC ve mIRC Kullanıcılarının Buluştuğu Forum (https://www.ircforumu.net/)
-   TCL Scriptler (https://www.ircforumu.net/tcl-scriptler/)
-   -   !duyuruekle & !duyurucikar (https://www.ircforumu.net/tcl-scriptler/2732-duyuruekle-duyurucikar.html)

immortaL 30 Haziran 2016 00:05

!duyuruekle & !duyurucikar
 
Kod:

# kullanımı :
# hangi kanalda duyuru eklemek -silmek isteniyorsa ,
# telnet/dcc üzerinden bota .chanset #kanalınız +duyuru
# komutuyla kodu aktif etmelisiniz.
# belirlenen kanalda op olanlar
# duyuru ekleyip silebilir.
# !dyrekle duyuruno duyurumsg
# !dyrsil duyuruno
# bota özelde duyur , duyuru ,dyr demeniz yeterli
# /msg botnick dyr ... gibi...
setudef flag duyuru
bind pub -|- !dyrekle duyuru:ekle
bind pub -|- !dyrsil duyuru:sil
bind msgm - "*" duyuru:duyur
proc duyuru:ekle {nick host hand chan arg} {
 if {[channel get $chan duyuru] || [isop $nick $chan]} { return }
  set dzn "duyurular.txt"
  set dyrno [lindex [split $arg] o]
  set dyrmsg [join [lrange [split $arg] 1 end]]
  if {dyrno == ""} { puthelp "notice $nick eksik komut girdiniz.kullanımı : !dyrekle duyuruno duyuru" return 0 }
  if {dyrmsg == ""} { puthelp "notice $nick eksik komut girdiniz.kullanımı : !dyrekle duyuruno duyuru" return 0 }
  if {[file exists $dzn] == 0} {
    set file [open $dzn w]
    close $file
  }
  set file [open $dzn a]
  puts $file $dyrmsg
  close $file
  puthelp "notice $nick $dyrno $dyrmsg eklendi"
}
 
proc duyuru:sil {nick host hand chan arg} {
  if {[channel get $chan duyuru] || [isop $nick $chan]} { return }
  set dyrno [lindex [split $arg] o]
  if {dyrno == ""} { puthelp "notice $nick yanlış komut girdiniz. kullanımı : !dyrsil duyuruno" return 0 }
  set dzn "duyurular.txt"
  if {[file exists $dzn] == 0} {
  set file [open $dzn w]
  close $file
  }
  set file [open $dzn "r"]
  set data [read -nonewline $file]
  close $file
  set lines [split $data "\n"]
  set i [expr $numara - 1]
  set delete [lreplace $lines $i $i]
  set files [open $dzn "w"]
  puts $files [join $delete "\n"]
  close $files
  set file [open $dzn "r"]
  set data [read -nonewline $file]
  close $file
  if {$data == ""} {
  set files [open $dzn "w"]
  close $files
  }
  puthelp "notice $nick $dyrno silindi."
}
proc duyuru:duyur {nick host hand arg} {
 global dyr
 if {[string match -nocase "duyur*" $arg] || [string match -nocase "dyr" $arg]} { return }
 if {[file exists $dzn] == 0} {
  set file [open $dzn w]
  close $file
 }
    set dzn "duyurular.txt"
    set file [open $dzn "r"]
    set w [read -nonewline $file]
    close $file
    set data [split $w "\n"]
    set i 0
  if {data == ""} { puthelp "privmsg $nick herhangi bir duyurunuz bulunmuyor" return 0 }
  foreach dyr $data
  set i [expr $i +1]
  puthelp "privmsg $nick duyurular $i $dzn"
}
putlog "ömrümü yidiniz bea.. ömrümü ömrümü..."


Pentagram 30 Haziran 2016 01:32

Cevap: !duyuruekle & !duyurucikar
 
Teşekkür ederim paylaşımın için @Che


Tüm Zamanlar GMT +3 Olarak Ayarlanmış. Şuanki Zaman: 12:50.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0
Copyright ©2005 - 2023 IRCForumu.Net - Tüm Hakları Saklıdır.