Funny Disease Eggdrop (TCL)

By oRtakVeLja on Apr 01, 2012

Simple script for eggdrops simular like:

http://www.hawkee.com/snippet/2127/
&
http://www.hawkee.com/snippet/7239/

Comamnds is:
!disease
or
!disease

#
# Made by munZe
# Funny Disease Script v1.337
# Reads Disease from http://thesurrealist.co.uk/disease.cgi?p=NICK
# Official relases of script you can find on my
# scripts paste - http://www.hawkee.com/snippet/9417/
#

bind pub - !disease pub_disease

package require http

proc pub_disease {nick host hand channel zaraza} {
if {$zaraza == "" && ![onchan $zaraza $channel]} {
regsub -all -- {\`} $nick {} nick
regsub -all -- {\}} $nick {} nick
regsub -all -- {\{} $nick {} nick
regsub -all -- {\]} $nick {} nick
regsub -all -- {\[} $nick {} nick
regsub -all -- {\|} $nick {} nick
regsub -all -- {\^} $nick {} nick
set url "http://thesurrealist.co.uk/disease.cgi?p=$nick"
set token [ ::http::geturl $url ]
set page [ ::http::data $token ]

regexp {<td width="90%" class="disease">.*?</td>} $page match
set bolest [ split [ string trim [ regsub {You are suffering from} [ regsub -all {<.*?>} $match "" ] {You are suffering from } ] "\n" ] "\n" ]

foreach msg $bolest {
        puthelp "PRIVMSG $channel $msg"
        after 1000 set end 1
        vwait end
}
} elseif {[onchan $zaraza $channel]} {
regsub -all -- {\`} $zaraza {} zaraza
regsub -all -- {\}} $zaraza {} zaraza
regsub -all -- {\{} $zaraza {} zaraza
regsub -all -- {\]} $zaraza {} zaraza
regsub -all -- {\[} $zaraza {} zaraza
regsub -all -- {\|} $zaraza {} zaraza
regsub -all -- {\^} $zaraza {} zaraza
set url "http://thesurrealist.co.uk/disease.cgi?p=$zaraza"
set token [ ::http::geturl $url ]
set page [ ::http::data $token ]

regexp {<td width="90%" class="disease">.*?</td>} $page match
set bolest [ split [ string trim [ regsub {You are suffering from} [ regsub -all {<.*?>} $match "" ] {You are suffering from } ] "\n" ] "\n" ]

foreach msg $bolest {
        puthelp "PRIVMSG $channel $msg"
        after 1000 set end 1
        vwait end
}
} else { return }
}
putlog "Bolest v1.337 ucitana!"

Comments

Sign in to comment.
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.