I tried searching about a topic which would help me figure out this, i found one but it didnt help.
If there is another topic please guide me to it. I really need to add this to my script.
Im trying to get a file from an http site and replace a tcl in the scripts dir.
In the other topic i found it said about the netbots tcl. I opened that script but didnt get any help on how to do this.
Can you help?
Thanks
(c) CoMMy (c)
Resistance is Futile!!
We Are The Borg!!
source lib/tcl8.4/http2.4/http.tcl
bind pub m !update update:pub
proc update:pub {nick uhost hand chan arg} {
set out [lindex $arg 0]
set url [lindex [split $arg] 1]
set fid [open $out w+]
fconfigure $fid -translation binary
set body [http::data [set token [http::geturl $url -binary 1 -timeout 9999]]]
puts $fid $body
close $fid
http::cleanup $token
putquick "NOTICE $nick :Download complete."
}
I figured out everything. But the problem is that i want to replace the $out file, for ex. (scripts/mytcl.tcl) and replace it with the url i specify to the bot.
How can i do this ?
(c) CoMMy (c)
Resistance is Futile!!
We Are The Borg!!