Code: Select all
bind pub - !geturl geturl:proc
proc geturl:proc {nick host handle channel text} {
set url [lindex $text 0]
set token [::http::geturl $url]
set content [::http::data $token]
::http::cleanup $content
foreach line [split $content \n] {
if {[regexp -nocase {http(.*?)} $content match url]} {
sendmsg #test "Data: [join $url]"
}
}
}