Hi!
At first the google.tcl worked just fine.
Managed to do at least 10 querys, then it stopped working...
This is what i get in my .log:
Tcl error [pub:google]: error writing "stderr": bad file number
I've searched the forums but no answer.
proc pub:google { nick uhost handle channel arg } {
global agent
if {[llength $arg]==0} {
putserv "PRIVMSG $channel :hey ! tappes des mots boulet !"
} else {
set query "http://www.google.com/search?btnI=&q="
for { set index 0 } { $index<[llength $arg] } { incr index } {
set query "$query[lindex $arg $index]"
if {$index<[llength $arg]-1} then {
set query "$query+"
}
}
putserv "PRIVMSG $channel :$query" <------ so far so good
set token [http::config -useragent $agent]
set token [http::geturl $query]
puts stderr ""
upvar #0 $token state
set max 0
foreach {name value} $state(meta) {
if {[regexp -nocase ^location$ $name]} {
set newurl [string trim $value]
putserv "PRIVMSG $channel :$newurl"
}
}
}
}
Any ideas?
And also, does anyone have supergoogle.tcl or a working link?
// Haddock