IRCForumları - IRC ve mIRC Kullanıcılarının Buluşma Noktası

IRCForumları - IRC ve mIRC Kullanıcılarının Buluşma Noktası (https://www.ircforumlari.net/)
-   Eggdrop, NeoStats, BNC (https://www.ircforumlari.net/eggdrop-neostats-bnc/)
-   -   Livescore Tcl (https://www.ircforumlari.net/eggdrop-neostats-bnc/335128-livescore-tcl.html)

Coder-Ufuk 16 Mayıs 2010 20:58

Livescore Tcl
 
Kod:

################################################################################
#                                                                              #
#      :::[  T h e  R u s s i a n  E g g d r o p  R e s o u r c e  ]:::      #
#    ____                __                                                    #
#  / __/___ _ ___ _ ___/ /____ ___  ___      ___  ____ ___ _    ____ __ __ #
#  / _/ / _ `// _ `// _  // __// _ \ / _ \    / _ \ / __// _ `/    / __// // / #
# /___/ \_, / \_, / \_,_//_/  \___// .__/ __ \___//_/  \_, / __ /_/  \___/  #
#      /___/ /___/                /_/    /_/          /___/ /_/              #
#                                                                              #
################################################################################
#                                                                              #
# livescore.tcl 2.0                                                            #
#                                                                              #
# Author: Stream@[Üye Olmadan Linkleri Göremezsiniz. Üye Olmak için TIKLAYIN...]net <stream@[Üye Olmadan Linkleri Göremezsiniz. Üye Olmak için TIKLAYIN...].org.ru> 
# prevod ot ruski: psycho <
Bu forumdaki linkleri ve resimleri görebilmek için en az 25 mesajınız olması gerekir.
>
#                                                                              #
# Official support: irc.eggdrop.org.ru @ #eggdrop                              #
#                                                                              #
################################################################################

if {![info exists egglib(ver)]} {
    putlog "************************************************"
    putlog "            egglib_pub NOT FOUND !"
    putlog "  Download last version of egglib_pub here:"
    putlog "  http://eggdrop.org.ru/scripts/egglib_pub.zip"
    putlog "************************************************"   
    die
}

if {[expr {$egglib(ver) < 1.4}]} {
    putlog "************************************************"
    putlog "    YOUR VERSION OF egglib_pub IS TOO OLD !"
    putlog "  Download last version of egglib_pub here:"
    putlog "  http://eggdrop.org.ru/scripts/egglib_pub.zip"
    putlog "************************************************"
    putlog " version installed : $egglib(ver)"
    putlog " version required: 1.4"
    die
}

#################################################

namespace eval ls {}

setudef flag nopubls

#################################################

bind pub - !ls        ::ls::pub_ls
bind pub - !score    ::ls::pub_ls
bind pub - !livescore    ::ls::pub_ls
bind msg - !ls        ::ls::msg_ls
bind msg - !score    ::ls::msg_ls
bind msg - !livescore    ::ls::msg_ls

#################################################

foreach p [array names ls *] { catch {unset ls($p)} }

#max results per public query
set ls(maxres)        10

set ls(timeout)    20
set ls(debug)        1

set ls(use_proxy)    0
set ls(proxy_host)    "proxy1.bezeqint.net"
set ls(proxy_port)    3128

#################################################
##### DON'T CHANGE ANYTHING BELOW THIS LINE #####
#################################################

set ls(ver)        "2.0"
set ls(authors)        "Stream@[Üye Olmadan Linkleri Göremezsiniz. Üye Olmak için TIKLAYIN...]Net <stream@[Üye Olmadan Linkleri Göremezsiniz. Üye Olmak için TIKLAYIN...].org.ru>"
set ls(agent)        "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 1.0.3705)"

#################################################

proc ::ls::pub_ls { nick uhost hand chan args } {
    if {[channel get $chan nopubls]} return
    set args [string tolower [string trim $args]]
    if {[llength [split [lindex $args 0]]] > 1 || [llength [split [lindex $args 0]]] == 0} {set args [split [lindex $args 0]]}
    if {[llength $args] < 1} {::egglib::outn $nick "Izpolzvai !livescore \[-strana\] <maska>. maskata moge da sydyrga '*' i '?' ."; return}
    ::ls::ls $nick $uhost $hand $chan $args
}
proc ::ls::msg_ls { nick uhost hand args } {
    set args [string tolower [string trim $args]]
    if {[llength [split [lindex $args 0]]] > 1 || [llength [split [lindex $args 0]]] == 0} {set args [split [lindex $args 0]]}
    if {[llength $args] < 1} {::egglib::outn $nick "Izpolzvai !livescore \[-strana\] <maska>. maskata moge da sydyrga '*' i '?' ."; return}
    ::ls::ls $nick $uhost $hand $nick $args
}

#################################################

proc ::ls::ls { nick uhost hand chan args } {
    global ls
    if {[info exists ls(host,$uhost)]} {::egglib::outn $nick "Predishnata zaqvka ne e izlylnena oshte..."; return}
    if {[llength [split [lindex $args 0]]] > 1 || [llength [split [lindex $args 0]]] == 0} {set args [split [lindex $args 0]]}
   
    if {[string range [lindex $args 0] 0 0] == "-"} {
        set country [string range [lindex $args 0] 1 end]
        set mask [lrange $args 1 end]
    } else {
        set country "ukraine"
        set mask $args
    }
   
    ::egglib::log $chan $nick "ls" "$country $mask"
    if {[string range $mask 0 0] != "*"} {set mask "*$mask"}
    if {[string range $mask end end] != "*"} {set mask "$mask\*"}
    set ls(host,$uhost) [list $country $mask]
    set url "
Bu forumdaki linkleri ve resimleri görebilmek için en az 25 mesajınız olması gerekir.
set id [::egglib::http_init "::ls::ls_"]
    if {$ls(use_proxy)} {::egglib::http_set_proxy $id $ls(proxy_host) $ls(proxy_port)}
    ::egglib::http_set_timeout $id $ls(timeout)
    ::egglib::http_get $id $url [list $nick $chan $uhost]
}

proc ::ls::ls_on_data { id html nick chan uhost } {
    global ls
      if {$ls(debug)} {putlog "\[ls\] callback executed... analyzing data..."}
     
      regsub -all -nocase -- <tr $html \n<tr html
      #::egglib::writedata "debugls.htm" [list $html]
     
    foreach line [split $html \n] {
        if {[regexp -nocase -- {<html>.*robots.*refresh.*URL\=(.*?)\".*action\=\"(.*?)\".*value\=\"(.*?)\"} $line garb url posturl sid]} {
            putlog "antibot check found. redirecting to $url & POSTing to $posturl (params sid=$sid)"
            set url "
Bu forumdaki linkleri ve resimleri görebilmek için en az 25 mesajınız olması gerekir.
set id [::egglib::http_init "::ls::ls1_"]
            if {$ls(use_proxy)} {::egglib::http_set_proxy $id $ls(proxy_host) $ls(proxy_port)}
            ::egglib::http_set_timeout $id 1
            ::egglib::http_get $id $url [list $nick $chan $uhost]
            set url "
Bu forumdaki linkleri ve resimleri görebilmek için en az 25 mesajınız olması gerekir.
set param "sid=$sid"
            set id [::egglib::http_init "::ls::lspost_"]
            if {$ls(use_proxy)} {::egglib::http_set_proxy $id $ls(proxy_host) $ls(proxy_port)}
            ::egglib::http_set_timeout $id $ls(timeout)
            ::egglib::http_set_method $id "POST"
            ::egglib::http_post $id $url $param [list $nick $chan $uhost]
            break
        }
    }
   
    if {$ls(debug)} {putlog "\[ls\] html parsed"}
}

proc ::ls::ls_on_error { id nick chan uhost } {
    global ls
    catch {unset ls(host,$uhost)}
    if {$ls(debug)} {putlog "\[ls\] connection timed out"}
    if {$nick == " "} {return}
    ::egglib::out $nick $chan "nemoga da se svyrga s livescore.com..."
}

proc ::ls::ls1_on_data { id html nick chan uhost } {
      ::egglib::writedata "debugls1.htm" [list $html]
    if {$ls(debug)} {putlog "\[ls1\] callback executed! Something is wrong..."}
}

proc ::ls::ls1_on_error { id nick chan uhost } {
    global ls
    if {$ls(debug)} {putlog "\[ls1\] connection timed out - OK"}
}

proc ::ls::lspost_on_data { id html nick chan uhost } {
    global ls
      if {$ls(debug)} {putlog "\[lspost\] callback executed... analyzing data..."}

      #::egglib::writedata "debugpost.htm" [list $html]
     
    set moved 0
    foreach line [split $html \n] {
        if {[string match "HTTP* 302 Object Moved" $line]} {set moved 1
        } elseif {$moved == 1} {
            if {[regexp -nocase -- {^Location\:\ (.*?)$} $line garb url]} {
                if {$ls(debug)} {putlog "recieved HTTP 302 Object Moved, new location: $url"}
                set url "
Bu forumdaki linkleri ve resimleri görebilmek için en az 25 mesajınız olması gerekir.
set id [::egglib::http_init "::ls::ls2_"]
                if {$ls(use_proxy)} {::egglib::http_set_proxy $id $ls(proxy_host) $ls(proxy_port)}
                ::egglib::http_set_timeout $id $ls(timeout)
                ::egglib::http_get $id $url [list $nick $chan $uhost]
            }
        }
    }
    if {$ls(debug)} {putlog "\[lspost]: html parsed"}
}

proc ::ls::lspost_on_error { id nick chan uhost } {
    global ls
    catch {unset ls(host,$uhost)}
    if {$ls(debug)} {putlog "\[lspost\] connection timed out"}
    if {$nick == " "} {return}
    ::egglib::out $nick $chan "nemoga da se svyrga s livescore.com..."
}

proc ::ls::ls2_on_data { id html nick chan uhost } {
    global ls
    catch {
        set country [lindex $ls(host,$uhost) 0]
        set mask [lrange $ls(host,$uhost) 1 end]
        #putlog "country = $country , mask = $mask"
        unset ls(host,$uhost)
    }
    if {$ls(debug)} {putlog "\[ls2\] callback executed... analyzing data..."}
   
    regsub -all -nocase -- <tr $html \n<tr html
    #::egglib::writedata "debugls2.htm" [list $html]
   
    if {$nick != $chan} {set nick ""}

    set cfound 0
    set cts ""
    set title ""
    set tshown 0
    set timedate ""
    set tdshown 0
    set resshown 0
    set restotal 0
    foreach line [split $html \n] {
        if {$cfound == 0} {
            if {[regexp -nocase -- {<tr><td.*><img.*name\=\"i(.*)\"\ alt.*><a\ href\=\"/default.dll\?page\=([a-z]+)\"\ on.*>(.*?)</a></td></tr>} $line garb cnum page ctr]} {
                if {$cnum > 4} {
                    if {$cts == ""} {set cts $page} else {set cts "$cts\, $page"}
                    if {$page == $country} {set cfound 1}
                }
            } elseif {[regexp -nocase -- {<tr><td.*><img.*name\=\"i(.*)\"\ alt.*><a\ href\=\"/default.dll\?page\=([a-z]+)\"\ class\=\"selected\">(.*?)</a></td></tr>} $line garb cnum page ctr]} {
                if {$cnum > 4} {
                    if {$cts == ""} {set cts $page} else {set cts "$cts\, $page"}
                    if {$page == $country} {set cfound 1}
                }
            }
            if {[string match "<tr><td colspan=\"4\" height=\"1\"></td></tr>" $line] && $cfound == 0} {
                ::egglib::out $nick $chan "Äîñòóïíûå çíà÷åíèÿ: $cts"
                return
            }
        }
        if {[regexp -nocase -- {^<tr.*><td\ class\=\"title\".*>\&nbsp\;<b>(.*?)</b>\ \-\ (.*?)</td></tr>} $line garb country league]} {
            set title "\002$country\002 - $league"
            set tshown 0
            set tdshown 0
            set timedate ""
            #putlog "title = $title"
            continue
        } elseif {[regexp -nocase -- {^<tr.*><td.*>\&nbsp\;(.*?)</td><td.*>(.*?)\&nbsp\;</td></tr>$} $line garb tm dt]} {
            if {$tm == ""} {set timedate $dt} else {set timedate "$tm, $dt"}
            set tdshown 0
            #putlog "timedate = $timedate"
            continue
        } elseif {![regexp -nocase -- {<tr.*><td.*>\&nbsp\;(.*?)</td><td.*>(.*?)</td>.*<a.*>(.*?)</a></td><td.*>(.*?)</td>} $line garb state team1 score team2]} {
            if {![regexp -nocase -- {<tr.*><td.*>\&nbsp\;(.*?)</td><td.*>(.*?)</td><td.*>(.*?)</td><td.*>(.*?)</td>} $line garb state team1 score team2]} {continue}
        }
        regsub -nocase {^(.*?)\-(.*?)$} $score {\1-\2} score
        set res "($state) $team1 $score $team2"
        if {[string match $mask [string tolower $res]]} {
            #putlog "res = $res"
            incr restotal
            if {$restotal > $ls(maxres) && $nick != $chan} {continue}
            incr resshown
            if {$tshown == 0} {
                ::egglib::out $nick $chan $title
                set tshown 1
            }
            if {$tdshown == 0} {
                ::egglib::out $nick $chan $timedate
                set tdshown 1
            }
            ::egglib::out $nick $chan $res
        }
    }
    if {$ls(debug)} {putlog "\[ls2\] html parsed"}
    if {$resshown < $restotal} {::egglib::out $nick $chan "Pokazani $resshown ot $restotal (pylniq spisyk shte byde pokazan s komanda na private)."}
}

proc ::ls::ls2_on_error { id nick chan uhost } {
    global ls
    catch {unset ls(host,$uhost)}
    if {$ls(debug)} {putlog "\[ls2\] connection timed out"}
    if {$nick == " "} {return}
    ::egglib::out $nick $chan "nemoga da se svyrga s livescore.com..."
}

putlog "livescore.tcl  | downloaded from
Bu forumdaki linkleri ve resimleri görebilmek için en az 25 mesajınız olması gerekir.
color="Silver">


arkadaslar botu görmek icin irc.dalnet.com #BAHLUL veya #eXtReMe kanalina girebilirsiniz..

Coder-Ufuk 18 Mayıs 2010 00:04

Cevap: Livescore Tcl
 
kardes cok kolay tcl yi scripts bölümüne ad kanalda otomatik msj atiyor

[22:58] <@bahlul> [FT Pandurii TG Jiu - FC Timisoara 0 - 0 (ROMANIA - Division 1) ] (none) LiveScore.TcL

[22:38] <@bahlul> [FT Hansa Rostock - FC Ingolstadt 04 0 - 2 (GERMANY - Bundesliga Ii Play Off) ] (none) LiveScore.TcL
[22:43] <@bahlul> [FT Hansa Rostock - FC Ingolstadt 04 0 - 2 (GERMANY - Bundesliga Ii Play Off) ] (none) LiveScore.TcL

MesqeN 20 Şubat 2012 11:58

Cevap: Livescore Tcl
 
bu tcl nin yeni versiyonlari varmı?

Oto calişir demişsin hangi kanala yazcak oldugu tüm kanalaramı biraz tuaf geldi
işlev komutu falan yokmudur bunun biraz detaylı anlatsaydın güzel olurdu

Heartbroken 20 Şubat 2012 17:09

Cevap: Livescore Tcl
 
bunuda denedim şimdi bide rus sitelerinde yapımcısının sitelerinde araştırdım .
script orjinal hali -> [Üye Olmadan Linkleri Göremezsiniz. Üye Olmak için TIKLAYIN...]

çıkışı 26/04/2005 yeni version yok.yabancı sitelerdede bu script için açılan yardım konuları yarım kalmış cevap verilmemiş.kimsede görünen artık çalışmıyor bu kod.

son yarım saattir kanalda ve hiçbişi postaladığı yok. +rusça cevap verior :p komutlara ,sanırım işlevini yitirmiş.büyük ihtimal veri aldığı sitedeki değişimler nedeniyle artık bişey çekemiyor siteden.

ufukcingay 20 Şubat 2012 23:33

Cevap: Livescore Tcl
 
senden almıştım ben bunu gökçe ama genede güzel bende çalşıyor

Alıntı:

Heartbroken Nickli Üyeden Alıntı (Mesaj 1041037231)
bunuda denedim şimdi bide rus sitelerinde yapımcısının sitelerinde araştırdım .
script orjinal hali -> [Üye Olmadan Linkleri Göremezsiniz. Üye Olmak için TIKLAYIN...]

çıkışı 26/04/2005 yeni version yok.yabancı sitelerdede bu script için açılan yardım konuları yarım kalmış cevap verilmemiş.kimsede görünen artık çalışmıyor bu kod.

son yarım saattir kanalda ve hiçbişi postaladığı yok. +rusça cevap verior :p komutlara ,sanırım işlevini yitirmiş.büyük ihtimal veri aldığı sitedeki değişimler nedeniyle artık bişey çekemiyor siteden.


Heartbroken 21 Şubat 2012 01:11

Cevap: Livescore Tcl
 
Selam..

çalışan burdaki değilde olsa olsa şu konudaki olsa gerek-> [Üye Olmadan Linkleri Göremezsiniz. Üye Olmak için TIKLAYIN...]

burdaki livescore kodu egglib_pub ile çalışıyor. benim burda Türkçe'ye çevirip paylaştığımsa http.tcl ile çalışıyordu,yani farklı kodlar.yanlış bilmiyorsam yapımcılarıda farklı...

bu yukardakini ve orjinal sitesinden çektiğimide denedim ..sonuç:


[Üye Olmadan Linkleri Göremezsiniz. Üye Olmak için TIKLAYIN...]

!ls yada !livescore komutlarına verdiği rusça mesajların dışında kodda işleyen bişey göremedim.heh bide :

[Üye Olmadan Linkleri Göremezsiniz. Üye Olmak için TIKLAYIN...]

partyline'da bi sürü güzel entresan hata mesajları ...

arşivde buda olmalı çünkü zamanında cümle alemi dolaşıp ne varsa topluyodum.ancak bunu ben hiç kullanmayı denemedim.diğer burda paylaştığımı kullanıodum botlardan birinde..


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

Powered by vBulletin® Version 3.8.8 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Search Engine Friendly URLs by vBSEO
Copyright ©2004 - 2024 IRCForumlari.Net