Tekil Mesaj gösterimi
Alt 29 Şubat 2012, 22:00   #6
Çevrimdışı
CLubber
Kullanıcıların profil bilgileri misafirlere kapatılmıştır.
IF Ticaret Sayısı: (0)
IF Ticaret Yüzdesi:(%)
Cevap: Karsilama, ugurlama tcl.




Kod:   Kodu kopyalamak için üzerine çift tıklayın!
bind pubm - "*" msg_tr proc msg_tr {nick uhand host chan text} { if {[string match -nocase "*selam*" $text]} { if {[throttled $uhand,$chan 10]} { return } putserv "PRIVMSG $chan Aleyküm Selam, $nick." } if {[string match -nocase "*s.a*" $text]} { if {[throttled $uhand,$chan 10]} { return } putserv "PRIVMSG $chan Aleyküm Selam, $nick." } if {[string match -nocase "*Merhaba*" $text]} { if {[throttled $uhand,$chan 10]} { return } putserv "PRIVMSG $chan Merhaba $nick." } if {[string match -nocase "*nasılsın*" $text]} { if {[throttled $uhand,$chan 10]} { return } putserv "PRIVMSG $chan İyiyiz $nick. sen nasılsın?" } if {[string match -nocase "*nerden*" $text]} { if {[throttled $uhand,$chan 10]} { return } putserv "PRIVMSG $chan İzmir, sen?" } if {[string match -nocase "*yaş*" $text]} { if {[throttled $uhand,$chan 10]} { return } putserv "PRIVMSG $chan 21, sizin?" } if {[string match -nocase "*bye*" $text]} { if {[throttled $uhand,$chan 10]} { return } putserv "PRIVMSG $chan Selametle $nick." } } proc throttled {id time} { global throttled if {[info exists throttled($id)]} { return 1 } { set throttled($id) [clock sec] utimer $time[list unset throttled($id)] return 0 } }

Kod:   Kodu kopyalamak için üzerine çift tıklayın!
bind raw * notice connection proc connection {from keyword arg} { global botnick if {[string match -nocase "*Client connecting on port*" $arg]} { set nick [lindex $arg 9] putquick "PRIVMSG #Sohbet Selam, $nick. Hoşgeldin :)" } }

TCL'deki 10 sayısı tekrar süresidir. O süre içerisinde yazsa bile, bot görmeyecektir.

utimer $time[list unset throttled($id)]

Bu kısımdaki $time ile [ arasında boşluk olması gerekli, forum nedeni ile çıkmıyor.

 
Alıntı ile Cevapla

IRCForumlari.NET Reklamlar
sohbet odaları reklam ver Benimmekan Mobil Sohbet