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/)
-   -   Sira BulucuTCL v3 (https://www.ircforumu.net/tcl-scriptler/2868-sira-bulucutcl-v3.html)

immortaL 02 Temmuz 2016 14:21

Sira BulucuTCL v3
 
Kod:

#####
# .. #
#####

# Kanal'i belirtin.
set ara(kanal) "#Webmaster"

# Komut on eki.
set ara(komut) ".ara"

##########
# CISS ! #
##########

bind pub – $ara(komut) ara:sira
proc ara:sira {nick uhost hand chan text} {
global botnick ara
        if {[string match -nocase $ara(kanal) $chan]} {
                set url "[lindex $text 0]"
                set keyword "[lrange $text 1 end]"
                regsub -all " " $keyword "%20" keyword
                if {$url == ""} { putquick "PRIVMSG $chan :Kullanimi: .ara   seklindedir."; return 0 }
                if {$keyword == ""} { putquick "PRIVMSG $chan :Kullanimi: .ara $url  seklindedir."; return 0 }
                set apiweb "https://www.sirabul.tk/api.xml?url=$url&keyword=$keyword"
                catch {set sayfa [::http::geturl $apiweb -timeout 5000]} error
                if {[string match -nocase "*couldn't open socket*" $error]} {
                        putquick "PRIVMSG $chan :Hata: Suan siteye baglanilamiyor... Daha sonra tekrar deneyiniz..."
                        ::http::cleanup $sayfa
                        return 0
                }
                if {[::http::status $sayfa] == "*timeout*"} {
                        putquick "PRIVMSG $chan :Hata: Baglanti zaman asimina ugradi..."
                        ::http::cleanup $sayfa
                        return 0
                }
                set html "[::http::data $sayfa]"
                ::http::cleanup $sayfa
                regexp -- {(.*?)} $html match hata
                regexp -- {(.*?)} $html match hataGoogle
                regexp -- {(.*?)} $html match hataBing
                regexp -- {(.*?)} $html match hataYandex
                regexp -- {(.*?)} $html match sonucGoogle
                regexp -- {(.*?)} $html match sonucBing
                regexp -- {(.*?)} $html match sonucYandex
                regexp -- {(.*?)} $html match gsira
                regexp -- {(.*?)} $html match glink
                regexp -- {(.*?)} $html match bsira
                regexp -- {(.*?)} $html match blink
                regexp -- {(.*?)} $html match ysira
                regexp -- {(.*?)} $html match ylink
                set glogo "12G4o7o12g3l4e"
                set blogo "12Bing"
                set ylogo "4Y1andex"
                if {[info exists hata]} {
                        putquick "PRIVMSG $chan :1$hata"
                }
                if {![info exists hata]} {
                        putquick "PRIVMSG $chan :1Arama motorlari siralamalariniz asagida yer almaktadir:"
                        putquick "PRIVMSG $chan :"
                        putquick "PRIVMSG $chan :10Aranan(lar):"
                        putquick "PRIVMSG $chan :4Url:2 $url"
                        regsub -all "%20" $keyword " " keyword
                        putquick "PRIVMSG $chan :4Kelime:2 $keyword"
                        putquick "PRIVMSG $chan :"
                        if {[info exists hataGoogle]} {
                                putquick "PRIVMSG $chan :$glogo: 2$hataGoogle"
                                putquick "PRIVMSG $chan :"
                        }
                        if {[info exists sonucGoogle]} {
                                putquick "PRIVMSG $chan :$glogo 10siralamaniz"
                                putquick "PRIVMSG $chan :4Siraniz:2 $gsira"
                                putquick "PRIVMSG $chan :4Link:2 $glink"
                                putquick "PRIVMSG $chan :"
                        }
                        if {[info exists hataBing]} {
                                putquick "PRIVMSG $chan :$hlogo: 2$hataBing"
                                putquick "PRIVMSG $chan :"
                        }
                        if {[info exists sonucBing]} {
                                putquick "PRIVMSG $chan :$blogo 10siralamaniz"
                                putquick "PRIVMSG $chan :4Siraniz:2 $bsira"
                                putquick "PRIVMSG $chan :4Link:2 $blink"
                                putquick "PRIVMSG $chan :"
                        }
                        if {[info exists hataYandex]} {
                                putquick "PRIVMSG $chan :$ylogo: 2$hataYandex"
                                putquick "PRIVMSG $chan :"
                        }
                        if {[info exists sonucYandex]} {
                                putquick "PRIVMSG $chan :$ylogo 10siralamaniz"
                                putquick "PRIVMSG $chan :4Siraniz:2 $ysira"
                                putquick "PRIVMSG $chan :4Link:2 $ylink"
                                putquick "PRIVMSG $chan :"
                        }
                        putquick "PRIVMSG $chan :1Sorgulama sonu..."
                }
                ::http::cleanup $html
        }
}

putlog "sira-bulucu-v3.tcl by TCL"

#######
# SON #
#######



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

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.