Konu: TCL Istek.
Tekil Mesaj gösterimi
Alt 15 Ocak 2009, 18:09   #4
Çevrimdışı
Mustafa2626
Kullanıcıların profil bilgileri misafirlere kapatılmıştır.
IF Ticaret Sayısı: (0)
IF Ticaret Yüzdesi:(%)
Cevap: TCL Istek.




Merhaba arkadaşlar elimde 2 tane tcl var düzenlenmesi lazım ben düzeltemedim yardım edermisiniz. biri hava tcl si biri yayın akışı tcl si . adresleri değişmiş ondan çalışmıyor düzenleyebilirmisiniz :S

Kod:   Kodu kopyalamak için üzerine çift tıklayın!
set verison "1.0.0.0" set author "absolut" bind pub - !hava hava package require http proc hava {nick uhost hand chan text} { set text [split [string trim $text]] if {$text == ""} {putquick "PRIVMSG $chan :\002Bir şehir adı belirtmelisiniz.";return} if {[llength $text] > 1} {putquick "PRIVMSG $chan :\002Bir defada sadece bir şehir için arama yapabilirsiniz.";return} set text [harf:dzlt $text] set text [string toupper $text 0 end] set havasite "[Üye Olmadan Linkleri Göremezsiniz. Üye Olmak için TIKLAYIN...]=" set sayfa "" catch {set sayfa [::http::geturl $havasite$text -timeout 3000]} error if {[string match -nocase "*couldn't open socket*" $error]} { putquick "PRIVMSG $chan :Hata: Şuan meteor.gov.tr'ye bağlanılamıyor.. Daha Sonra Tekrar Deneyiniz.." ::http::cleanup $sayfa return } if { [::http::status $sayfa] == "*timeout*" } { putquick "PRIVMSG $chan :Hata: meteor.gov.tr'ye bağlantı zaman aşımına uğradı.." ::http::cleanup $sayfa return } set html [::http::data $sayfa] ::http::cleanup $sayfa regsub -all {\n} $html {} html regsub -all {\t} $html {} html regsub -all {&nbsp;} $html {} html regsub -all {İ} $html {i} html regsub -all {Ä^} $html {G} html regsub -all {.^Ş} $html {S} html regsub -all {Ç} $html {C} html regsub -all {Ü} $html {U} html regsub -all {Ö} $html {O} html regexp -- {>.l ve .l.elerimizde Hava / <span class="renkAA">(.+?)<} $html - sehir if {[string match -nocase $sehir "ankara"]} { if {![string match -nocase $text $sehir]} { putquick "privmsg $chan :\002Şehir adını yanlış yazdınız." return 0 } } regexp -- {<th style="width:15%;" class="th yanR">(.+?)<br .>(.+?)</th>} $html - bgn saa regexp -- {<td class="vGoster yanR ...S">(.+?)</td>} $html - sck regexp -- {"vGosterN yanR">(.+?)</td>} $html - nem regexp -- {class="yanR altC"><img src=.+alt="(.*?)" width="25px"} $html - drm regexp -- {style="vertical-align:top;">(.+?)</span>} $html - rzgr regexp -- {class="th">(.+?)<br .>(.+?)</th>} $html - tarih gun regexp -- {td class="vGoster"><span class="minS">(.+?)</span>/<span class="maxS">(.+?)</span></td>} $html - min max putquick "PRIVMSG $chan :\00312 \[$sehir\] \00302için Hava Durumu Sonuçları" putquick "PRIVMSG $chan :\00306 $bgn $saa" putquick "PRIVMSG $chan :\00305 Sıcaklık:\00304 $sck°C\00305 Durum:\00304 $drm" putquick "PRIVMSG $chan :\00305 Nem:\00304 %$nem \00305Rüzgar:\00304 $rzgr km/sa" putquick "PRIVMSG $chan :\00306 $tarih $gun" putquick "PRIVMSG $chan :\00305 En Düşük:\00304 $min°C \00305En Yüksek:\00304 $max°C" } proc harf:dzlt {arg} { regsub -all -- ı $arg i arg regsub -all -- İ $arg I arg regsub -all -- ğ $arg g arg regsub -all -- ş $arg s arg regsub -all -- ç $arg c arg regsub -all -- Ğ $arg G arg regsub -all -- Ş $arg S arg regsub -all -- ş $arg s arg regsub -all -- ü $arg u arg regsub -all -- ö $arg o arg regsub -all -- Ü $arg U arg regsub -all -- O $arg O arg return $arg } putlog "havadurumu.tcl $version by $author başarıyla yüklendi."

Kod:   Kodu kopyalamak için üzerine çift tıklayın!
# ## Komutun çalışmasını istediğiniz kanalları aralarına virgül koyarak yazınız. ## Bütün kanallarda çalışmasını istiyorsanız "" yazınız. (boş bırakınız). # set yayin(kanallar) "#ematrak,#haber,#huston" # ## Komutu kimlerin kullanabileceğini belirleyiniz. ## 0 - Herkes ## 1 - Voice ve daha yukarısı ## 2 - Halfop ve daha yukarısı ## 3 - Op ve daha yukarısı # set yayin(statu) 3 # ## Mesaj tipi. Botun cevabı hangi yolla vereceğini belirler.. ## 1 - Kanala mesaj, 2 - Kanala notice, 3 - Kişiye notice, 4 - Kişiye özel mesaj # set yayin(msgtype) 1 # ## Ardı ardına komut talebinde bulunmayı önlemek için iki komut arasındaki ## beklemesi süresini giriniz (süre saniye cinsindendir) # set yayin(bekleme) 30 # ## Siteye bağlanmaya çalışırken ki timeout süresini giriniz # set yayin(timeout) 2000 ################################################################## # # ## !!!!!Buradan Sonrasına Dokunmayınız!!!!! ## # # ################################################################## set yayin(url) "[Üye Olmadan Linkleri Göremezsiniz. Üye Olmak için TIKLAYIN...]" set yayin(tvler) { "1 trt-1" "2 star-tv" "3 show-tv" "4 kanal-d" "5 cnbce-e" "6 atv" "7 kanal7" "8 cnn-turk" "9 stv" "10 ntv" "11 fox-tv" "12 cine5" "13 tv8" "14 e2" "15 trt2" "16 lig-tv" "17 kanal-1" "18 trt-int" "19 tnt" } if {$yayin(msgtype) == "1"} { set yayin(mesaj) "privmsg %chan%" } elseif {$yayin(msgtype) == "2"} { set yayin(mesaj) "notice %chan%" } elseif {$yayin(msgtype) == "3"} { set yayin(mesaj) "notice %nick%" } elseif {$yayin(msgtype) == "4"} { set yayin(mesaj) "privmsg %nick%" } else { die Gecersiz Mesaj tipi sectiniz. Uygun degerler : 1, 2, 3, ya da 4 olabilir. } if {$yayin(statu) > 3 || $yayin(statu) == "" || $yayin(statu) < 0 || [string is integer $yayin(statu)] != 1} { die yayin(statu) degerini gecersiz bir deger girdiniz! Sadece 0, 1, 2 ya da 3 olabilir. } proc kstatu {nick chan type} { switch -- $type { 0 { return devam } 1 { if {[isvoice $nick $chan] || [ishalfop $nick $chan] || [isop $nick $chan]} { return devam } } 2 { if {[ishalfop $nick $chan] || [isop $nick $chan]} { return devam } } 3 { if {[isop $nick $chan]} { return devam } } } } bind pub - !tv tv_yayin package require http proc tv_yayin {nick user host chan arg} { global yayin if {[string match -nocase *$chan* $yayin(kanallar)] == 1 || $yayin(kanallar) == "" || [kstatu $nick $chan $yayin(statu)] == "devam"} { regsub -all {%chan%} $yayin(mesaj) $chan yayin(mesaj) regsub -all {%nick%} $yayin(mesaj) $nick yayin(mesaj) if {[llength $arg] < 1} { putquick "$yayin(mesaj) :Kanal Adı belitrmediniz." putquick "$yayin(mesaj) :Kullanım : !tv <kanal-adi>" return 0 } if {[llength $arg] < 1} { putquick "$yayin(mesaj) :Hata : Bir defada ancak bir kanalı sorgulayabilirsiniz." return 0 } if {[string match -nocase kanallar $arg]} { set x "" foreach y $yayin(tvler) { lappend x "\002#[lindex $y 0]" lappend x "\002[lindex $y 1]" } putlog "$yayin(mesaj)" putquick "$yayin(mesaj) :Kanal Listesi:" putquick "$yayin(mesaj) :$x" return 0 } foreach z $yayin(tvler) { if {[string match -nocase $arg [lindex $z 1]]} { set kanalno [lindex $z 0] ; set kanaladi [lindex $z 1] break } } if {![info exists kanalno]} { putquick "$yayin(mesaj) :Hata : Kanal adını yanlış yazdınız." putquick "$yayin(mesaj) :Kanal listesini için \00312!tv kanallar \003yazınız." return 0 } if {[info exists ::sorgu(yayin)] && $::sorgu(yayin) == "1"} { putquick "$yayin(mesaj) :Üzgünüm, Bir sonraki kanal sorgusu için \037$yayin(bekleme) saniye\037 beklemelisiniz." set ::sorgu(yayin) "2" return 0 } if {[info exists ::sorgu(yayin)] && $::sorgu(yayin) == "2"} { return 0 } set sene [clock format [clock seconds] -format %Y] if {[string index [clock format [clock seconds] -format %m] 0] == "0"} { set ay [string index [clock format [clock seconds] -format %m] 1] } if {[string index [clock format [clock seconds] -format %m] 0] != "0"} { set ay [clock format [clock seconds] -format %m] } if {[string index [clock format [clock seconds] -format %d] 0] == "0"} { set gun [string index [clock format [clock seconds] -format %d] 1] } if {[string index [clock format [clock seconds] -format %d] 0] != "0"} { set gun [clock format [clock seconds] -format %d] } set adres "$yayin(url)$kanalno/$kanaladi/$sene-$ay-$gun" catch {set sayfa [::http::geturl $adres -timeout $yayin(timeout)]} error if {[string match -nocase "*couldn't open socket*" $error]} { putquick "$yayin(mesaj) :Hata: Şuan siteye bağlanılamıyor.. Daha Sonra Tekrar Deneyiniz.." ::http::cleanup $sayfa return } if { [::http::status $sayfa] == "*timeout*" } { putquick "$yayin(mesaj) :Hata: Site'ye bağlantı zaman aşımına uğradı.." ::http::cleanup $sayfa return } set html [::http::data $sayfa] ::http::cleanup $sayfa regsub -all {\n} $html {} html regsub -all {&nbsp;} $html {} html regexp -- {name="ORTABOLUM".-->.+<strong>(.*?)</strong>.<p>} $html - zaman regexp -- {<body><p>(.*?)</p></body>} $html - akis if {[regexp {.+http://.+} $akis]} { set akis "Üzgünüm : Sitede bu kanalın yayın akışı henüz görüntülenemiyor." } regsub -all {&uuml;} $akis {ü} akis regsub -all {&Uuml;} $akis {Ü} akis regsub -all {’} $akis {'} akis regsub -all {&rsquo;} $akis {´} akis regsub -all {&ccedil;} $akis {ç} akis regsub -all {&Ccedil;} $akis {Ç} akis regsub -all {&Ouml;} $akis {Ö} akis regsub -all {&ouml;} $akis {ö} akis regsub -all {<br />} $akis {|} akis putquick "$yayin(mesaj) :\00304\037 $zaman" foreach m [split $akis |] { putquick "$yayin(mesaj) :\00305 [lindex $m 0] \00302[lrange $m 1 end]" } set ::sorgu(yayin) "1" utimer $yayin(bekleme)[list set ::sorgu(yayin) "0"] } } putlog "- tv.tcl By - SaW Basariyle Yuklendi." # ## #%v80658#%ak5698412#%d0025#%tv.tcl# #


 
Alıntı ile Cevapla

IRCForumlari.NET Reklamlar
sohbet odaları reklamver bizimmekan