egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Horoscope help

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
albozz
Voice


Joined: 12 Jul 2016
Posts: 8
Location: Albania

PostPosted: Tue Jan 12, 2021 5:57 pm    Post subject: Horoscope help Reply with quote

Hello i need help to thith hosroscope

Code:
bind pub - !h horoskopi:shqip
package require http
set webi http://top-channel.tv/horoskopi

proc horoskopi:shqip { nick host hand chan text } {
        global webi

        set shenjaUser [lindex $text 0]
        set shenja [string tolower $shenjaUser]

        #NQS nuk shkruan shenjen, por ben vetem !h
        if {$shenja == ""} {
                putserv "NOTICE $nick Komanda eshte shembull: !h dashi"
        }

        #NQS shkruan vetem shenjat e horoskopit
        if {[string match -nocase "dashi" $shenja] || [string match -nocase "demi" $shenja] || [string match -nocase "binjaket" $shenja] ||
                [string match -nocase "gaforrja" $shenja] || [string match -nocase "luani" $shenja] || [string match -nocase "virgjeresha" $shenja] ||
                [string match -nocase "peshorja" $shenja] || [string match -nocase "akrepi" $shenja] || [string match -nocase "shigjetari" $shenja] ||
                [string match -nocase "bricjapi" $shenja] || [string match -nocase "ujori" $shenja] || [string match -nocase "peshqit" $shenja]} {
               
                set c [::http::geturl $webi/[strftime "%d-%m-%Y"]/?shenja=$shenja]
                set l [split [::http::data $c] "\n"]
                ::http::cleanup $c
                set c 0
               
                foreach x $l {
                        incr c
                        switch $c {
                                283 {
                                        putnow "PRIVMSG #opers :$nick \002$shenja\002: [html $x]"
                                }
                        }
                }
        #NQS nuk shkruan shenjat e mesiperme, jepet ky errori
        } else {
                putserv "NOTICE $nick Komanda eshte shembull: !h dashi"
        }
}

proc html { text } {
regsub -all "<p>" $text "" text
regsub -all "</p>" $text "" text
return $text
}


[22:39] (Eggdrop) albozz ujori: <li id="menu-item-18527" class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-18527"><a href="https://top-channel.tv/artikuj/teknologji/">Teknologji</a></li>[/quote]
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber