IRCForumu.ORG

IRCForumu.ORG (https://www.ircforumu.org/)
-   Genel IRCD (Sunucu, Servis, Botlar, Korumalar) (https://www.ircforumu.org/genel-ircd-sunucu-servis-botlar-korumalar/)
-   -   Covid-19 TCL! (https://www.ircforumu.org/genel-ircd-sunucu-servis-botlar-korumalar/1545-covid-19-tcl.html)

(.+?)} $kaynak] {n iki} [regexp -all -inline -- {(.+?)} $kaynak] {
        regexp -- {
.+?} $bir - sehir yuzde
        if {[llength $hedefil]} {
            if {[string match -nocase *$hedefil* $sehir]} {
                lappend out [renkle $sehir [string trim $iki]]\00314$yuzde\003
            }
        } else {
            if {[string match -nocase *$sehir* $::iller]} {
                lappend out [renkle $sehir [string trim $iki]]\00314$yuzde\003-
            }
        }
        regsub -all -- "<.+?>" $out {} out
        regsub -all -- {\s+} $out " " out
        set out [string trim $out]
        incr i
    }
    puthelp "privmsg $chan :[join $out]"
}

proc renkle {il durum} {
    switch -nocase -- $durum {
            Orta { set risk "\00308\002$il\002\003 \00308$durum\003" }
          Düşük { set risk "\00312\002$il\002\003 \00312$durum\003" }
          Yüksek { set risk "\00307\002$il\002\003 \00307$durum\003" }
    "Çok Yüksek" { set risk "\00304\002$il\002\003 \00304$durum\003" }
        default { set risk "\002$il\002 $durum" }
    }
    return $risk
}

proc covid_pubs {nick uhost hand chan text} {
    if {![channel get $chan korona]} { return 0 }
    set ashi [Got_C19 $::vaccine]   
    set cov [json::json2dict [Got_C19 $::url]]
    regexp -- {yapilanasisayisi = (.+?);.+?= (.+?);.+?= (.+?);.+?= (.+?);.+?= '(.+?)';} $ashi "" asayi kisay 1doz 2doz sonup
    dict with cov {
        puthelp "privmsg $chan :\00312$tarih\003 \00314Türkiye'deki Güncel Durum\003 \00303TÜRKİYE GÜNLÜK KORONAVİRÜS TABLOSU\003 :"
        puthelp "privmsg $chan :\00302\002BUGÜN\002\003 \002TEST SAYISI\002 : \00304$gunluk_test\003 \002VAKA SAYISI\002 : \00304$gunluk_vaka\003 \002HASTA SAYISI\002 :\
        \00304$gunluk_hasta\003 \002VEFAT SAYISI\002 : \00304$gunluk_vefat\003 \002İYİLEŞEN SAYISI\002 : \00304$gunluk_iyilesen\003"
        puthelp "privmsg $chan :\00302\002BU HAFTA\002\003 \002HASTALARDA ZATÜRRE ORANI\002 : \00304%$hastalarda_zaturre_oran\003 \002YATAK DOLULUK ORANI\002 : \00304%$yatak_doluluk_orani\003\
        \002ERİŞKİN YOĞUN BAKIM DOLULUK ORANI\002 : \00304%$eriskin_yogun_bakim_doluluk_orani\003 \002VENTİLATÖR DOLULUK ORANI\002 :\
        \00304%$ventilator_doluluk_orani\003 \002ORTALAMA TEMASLI TESPİT SÜRESİ\002 : \00304$ortalama_temasli_tespit_suresi Saat\003 \002FİLYASYON ORANI\002 : \00304%$filyasyon_orani\003"
        puthelp "privmsg $chan :\00302\002TOPLAM\002\003 \002TEST SAYISI\002 : \00304$toplam_test\003 \002VAKA SAYISI\002 : \00304$toplam_hasta\003\
        \002VEFAT SAYISI\002 : \00304$toplam_vefat\003 \002AĞIR HASTA SAYISI\002 : \00304$agir_hasta_sayisi\003 \002İYİLEŞEN HASTA SAYISI\002 : \00304$toplam_iyilesen\003"
        puthelp "privmsg $chan :\002YAPILAN AŞI SAYISI\002 : \00304[getr8 $asayi]\003 \002AŞI YAPILAN KİŞİ SAYISI\002 : \00304[getr8 $kisay]\003\
        \0021.DOZ AŞI YAPILAN KİŞİ SAYISI\002 : \00304[getr8 $1doz]\003 \0022.DOZ AŞI YAPILAN KİŞİ SAYISI\002 : \00304[getr8 $2doz]\003 \002GÜNCELLEME SAATİ\002 : \00304[getr8 $sonup]\003"
        puthelp "privmsg $chan :[pandemi_risk $nick $uhost $hand $chan $text]"
    }
    return 0
}

proc getr8 num { regsub -all -- {\d(?=(\d{3})+($|\.))} $num {\0.} }

proc Got_C19 Linkin {
    set token [http::geturl $Linkin]
    set data [http::data $token]
    ::http::cleanup $token
    regsub -all -- {.*?} $data "" data
    regsub -all -- {.*?var sondurumjson = \[} $data "" data
    regsub -all -- {\];//\]\]>.*?} $data "" data
    regsub -all -- {<.+?>} $data "" data
    return [string trim $data]
}
No_FeaR 25 Haziran 2021 00:06

Covid-19 TCL!
 
m = Bot Master, n = Bot Sahibi
o = Kanal Op'u , a = Kanal'da Oto-Op Alan
Kişiler Tarafından Verilecek: .cov
Komutuyla #Kanal'a Atar!







Kod:

set url {https://covid19.saglik.gov.tr/?_Dil=2}
set vaccine {https://covid19asi.saglik.gov.tr/}
set iller {istanbul ankara İzmir manisa Van Diyarbakır antalya muğls kocaeli edirne trabzon Ağrı}

setudef flag korona

package require http
package require tls 1.7
package require json
package present Tcl 8.5

::http::register https 443 [list tls::socket -autoservername 1]

bind pub - .cov covid_pubs
bind pub - .risk pandemi_risk

proc pandemi_risk {nick uhost hand chan arg} {
    set pan [http::geturl https://covid19.saglik.gov.tr/]
    set kaynak [http::data $pan]
    ::http::cleanup $pan
    set hedefil [lindex [split $arg] 0]
    set out {}
    set i 0
    foreach {_ bir} [regexp -all -inline -- {
(.+?)(.+?)


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

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO ©2011, Crawlability, Inc.