Code: Select all
package require http
bind pub - !read foo
proc foo {n u h c t} {
set x [::http::geturl www.website.com/file.txt]
foreach e [split [::http::data $x] \n] {puthelp "privmsg $c :$e"}
::http::cleanup $x
}
Code: Select all
package require http
bind pub - !read foo
proc foo {n u h c t} {
set x [::http::geturl www.website.com/file.txt]
foreach e [split [::http::data $x] \n] {puthelp "privmsg $c :$e"}
::http::cleanup $x
}
Code: Select all
[lrange [split [::http::data $x] \n] 0 3]
Code: Select all
[split [::http::data $x] \n]