<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
	<link rel="self" type="application/atom+xml" href="https://forum.eggheads.org/app.php/feed/topic/4831" />

	<title>egghelp/eggheads community</title>
	<subtitle>Discussion of eggdrop bots, shell accounts and tcl scripts.</subtitle>
	<link href="https://forum.eggheads.org/index.php" />
	<updated>2003-07-04T16:03:08-04:00</updated>

	<author><name><![CDATA[egghelp/eggheads community]]></name></author>
	<id>https://forum.eggheads.org/app.php/feed/topic/4831</id>

		<entry>
		<author><name><![CDATA[Ofloo]]></name></author>
		<updated>2003-07-04T16:03:08-04:00</updated>

		<published>2003-07-04T16:03:08-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=23045#p23045</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=23045#p23045"/>
		<title type="html"><![CDATA[http get]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=23045#p23045"><![CDATA[
TnX for answering ok , one more question what would be a good way to set the first char then ? <br><br>and what is lindex used for .... or when hehe<br><br>so i probably should do this<br><blockquote class="uncited"><div>set arg [split $arg] <br>set out [lindex $arg 0]<br>set url [join [lrange $arg 1 end]]</div></blockquote>or am i wrong again :/ lol<br><br>so what is the difference between lrange lindex lsearch i think is there as well so i mean when do i use one or an other to me they all look the same just named different<br><br>i only understand i can do this instead of using set<br><br>lindex {a, b}<br><br>and use them as vars .. instead of using set<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3151">Ofloo</a> — Fri Jul 04, 2003 4:03 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Papillon]]></name></author>
		<updated>2003-07-04T15:20:58-04:00</updated>

		<published>2003-07-04T15:20:58-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=23042#p23042</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=23042#p23042"/>
		<title type="html"><![CDATA[http get]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=23042#p23042"><![CDATA[
You don't have to set a filname each time... Just use the <a href="http://tcl.activestate.com/man/tcl8.4/TclCmd/file.htm" class="postlink">file</a> command on the url and name the file to the same as the one beeing downloaded<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=852">Papillon</a> — Fri Jul 04, 2003 3:20 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Papillon]]></name></author>
		<updated>2003-07-04T15:17:29-04:00</updated>

		<published>2003-07-04T15:17:29-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=23041#p23041</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=23041#p23041"/>
		<title type="html"><![CDATA[http get]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=23041#p23041"><![CDATA[
Good <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br>just to answer your questions... to let others know <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink">....<br>the <em class="text-italics">-timeout</em> option is there to set a certain time the connection should try to get a successfull reply, if it doesn't get it by the given time you will get an error.<br><div class="codebox"><p>Code: </p><pre><code>set out [lindex $arg 0] </code></pre></div>this is still wrong...<br><strong class="text-strong">lindex</strong> is a list command and shall ONLY be used on valid lists. $arg is not a valid list so you will have to make it one before using <strong class="text-strong">lindex</strong> on it<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=852">Papillon</a> — Fri Jul 04, 2003 3:17 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Ofloo]]></name></author>
		<updated>2003-07-04T15:06:45-04:00</updated>

		<published>2003-07-04T15:06:45-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=23040#p23040</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=23040#p23040"/>
		<title type="html"><![CDATA[http get]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=23040#p23040"><![CDATA[
ok figured it out<br><div class="codebox"><p>Code: </p><pre><code>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." }</code></pre></div>TnX for the help REALY appriciate it hehe<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3151">Ofloo</a> — Fri Jul 04, 2003 3:06 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Ofloo]]></name></author>
		<updated>2003-07-04T14:27:44-04:00</updated>

		<published>2003-07-04T14:27:44-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=23039#p23039</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=23039#p23039"/>
		<title type="html"><![CDATA[http get]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=23039#p23039"><![CDATA[
First of all tnx verry mutch.<br><br>hmm i think i start to understand<br><br>ah so i need to say what the file will be called hmm ok sounds logic didn't think of that, tought the lib handled that and time out aswell :/ hehe <br><br>the time-out i know what it is for just wondering why like this:<br><br>you sad before for time out use cleanup, but you do it on the end while the time out is defined in the url<br><br>i am not critising just trying to understand it. beter make it logic <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";-)" title="Wink"><br><br>to understand beter what you mean whould this bepossible i mean cause a list command is just like arg and all that is after it so if i would wana name the file it would need to be able to name it and i could do this by setting the first arg to an normal not list command if i did it just would it include in the url write ??? or am i wrong.<br><div class="codebox"><p>Code: </p><pre><code>source lib/tcl8.4/http2.4/http.tclbind 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+]   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."}</code></pre></div>i removed the catch cause it kept the file open (couldn't be executed or anything) but i got an other problem, if i check byte size the file is the same, but if i compare them with a hex the new file is little bigger. meaning it has crc errors, i also tryed binary 0 and left it out but no results, ive tryed wiht catch and without.. i added the notice cause like this i could see if all was done so it didn't stop somewhere. i tought the binary was there to prevent crc in compressed or executable files :/<br><br><br>ok like i tought it downloaded it in ascii cause when i download it with or without the -binary 1 it doesn't make a difference and strange enough these apear to be equal so ..., this means to me that it is downloading it in ascii even tho you define it to be binary.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3151">Ofloo</a> — Fri Jul 04, 2003 2:27 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Papillon]]></name></author>
		<updated>2003-07-04T12:12:26-04:00</updated>

		<published>2003-07-04T12:12:26-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=23033#p23033</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=23033#p23033"/>
		<title type="html"><![CDATA[http get]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=23033#p23033"><![CDATA[
I use it mainly as a error prevention. No hurt in removing it... just old habit I guess <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=852">Papillon</a> — Fri Jul 04, 2003 12:12 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[user]]></name></author>
		<updated>2003-07-04T06:32:38-04:00</updated>

		<published>2003-07-04T06:32:38-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=23014#p23014</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=23014#p23014"/>
		<title type="html"><![CDATA[http get]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=23014#p23014"><![CDATA[
<blockquote class="uncited"><div><div class="codebox"><p>Code: </p><pre><code>catch {close $fid}</code></pre></div></div></blockquote>There's no need to catch close. Do you have any particular reason for doing it? (I've seen you do it in other posts too iirc)<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2878">user</a> — Fri Jul 04, 2003 6:32 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Papillon]]></name></author>
		<updated>2003-07-04T06:19:44-04:00</updated>

		<published>2003-07-04T06:19:44-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=23011#p23011</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=23011#p23011"/>
		<title type="html"><![CDATA[http get]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=23011#p23011"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>set url [lindex $arg 0] </code></pre></div>first line of bad coding... <strong class="text-strong"><span style="text-decoration:underline">ALWAYS</span></strong> make sure it is actually a LIST you are doing the list command on <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink"><br><div class="codebox"><p>Code: </p><pre><code>puts [http::data [http::geturl $url -binary boolean]]</code></pre></div>second line <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink"><br>first of as ppslim said.. you need to put it somewhere, open a file to put it in..<br><br><em class="text-italics">-binary boolean</em> &lt;--- change that to <em class="text-italics">-binary 1</em><br>also it might be a good idea to do <span style="text-decoration:underline">http::cleanup</span> at the end ...and a timeout on the connection to maybe?<br><br>so the final code would look something like this:<div class="codebox"><p>Code: </p><pre><code>bind pub m !update update:pub proc down:pub {nick uhost hand chan arg} {   set url [lindex [split $arg] 0]   set fid [open somefile w+]  set body [http::data [set token [http::geturl $url -binary 1 -timeout 9999]]]  puts $fid $body  catch {close $fid}  http::cleanup $token}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=852">Papillon</a> — Fri Jul 04, 2003 6:19 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2003-07-04T02:03:10-04:00</updated>

		<published>2003-07-04T02:03:10-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=22990#p22990</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=22990#p22990"/>
		<title type="html"><![CDATA[http get]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=22990#p22990"><![CDATA[
Damn.. Ignore my previous reply. I think I'll take a lil vacation or something, I've had some way to screwd up days this week..<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Fri Jul 04, 2003 2:03 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[user]]></name></author>
		<updated>2003-07-04T01:09:35-04:00</updated>

		<published>2003-07-04T01:09:35-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=22986#p22986</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=22986#p22986"/>
		<title type="html"><![CDATA[http get]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=22986#p22986"><![CDATA[
<blockquote class="uncited"><div>Doh! use <em class="text-italics">::http::geturl</em> not <em class="text-italics">http::geturl </em></div></blockquote>That's not it. Read the error message <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_razz.gif" width="15" height="15" alt=":P" title="Razz"> (wrong # args)<br><br>Prefixing the namespace name with :: is only needed if you're executing code in a differen namespace than the parent and a namespace by that same name exists but is not the one you want.<br>...uhm <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_razz.gif" width="15" height="15" alt=":P" title="Razz"> Was that even remotely clear?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2878">user</a> — Fri Jul 04, 2003 1:09 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2003-07-04T00:47:50-04:00</updated>

		<published>2003-07-04T00:47:50-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=22985#p22985</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=22985#p22985"/>
		<title type="html"><![CDATA[http get]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=22985#p22985"><![CDATA[
Doh! use <em class="text-italics">::http::geturl</em> not <em class="text-italics">http::geturl </em>..<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Fri Jul 04, 2003 12:47 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Ofloo]]></name></author>
		<updated>2003-07-03T17:51:08-04:00</updated>

		<published>2003-07-03T17:51:08-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=22976#p22976</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=22976#p22976"/>
		<title type="html"><![CDATA[http get]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=22976#p22976"><![CDATA[
Sorry i don't know it and like your quote used to say that it is best xplained by ignorence well i have no clue if you know it suggestions what i read ive read ive tryed, maybe i missed something , maybe i misunderstood, but your answer doesn't make me any wizer then i allready was :/<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3151">Ofloo</a> — Thu Jul 03, 2003 5:51 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2003-07-03T02:30:14-04:00</updated>

		<published>2003-07-03T02:30:14-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=22934#p22934</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=22934#p22934"/>
		<title type="html"><![CDATA[http get]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=22934#p22934"><![CDATA[
Are you blind or plain stupid? The *error* says what you should do.. seesh!<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Thu Jul 03, 2003 2:30 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Ofloo]]></name></author>
		<updated>2003-07-02T19:39:57-04:00</updated>

		<published>2003-07-02T19:39:57-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=22923#p22923</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=22923#p22923"/>
		<title type="html"><![CDATA[http get]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=22923#p22923"><![CDATA[
anny one ??<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3151">Ofloo</a> — Wed Jul 02, 2003 7:39 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Ofloo]]></name></author>
		<updated>2003-06-28T19:39:40-04:00</updated>

		<published>2003-06-28T19:39:40-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=22707#p22707</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=22707#p22707"/>
		<title type="html"><![CDATA[http get]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=22707#p22707"><![CDATA[
if i read well i don't need to load http 2.4 cause it is a thing that is loaded in the tcl core i checked lib and it was there.. i checked syntax manual at <a href="http://mini.net/tcl/1475" class="postlink">http://mini.net/tcl/1475</a> and it showed the syntax i was using but i still get an error <blockquote class="uncited"><div>[01:30] Tcl error [update:pub]: wrong # args: should be "::http::geturl url args"</div></blockquote>so what am i doing wrong ?<br><br>it just needs to download a file that is it an binairy file<br><div class="codebox"><p>Code: </p><pre><code>bind pub m !update update:pubproc down:pub {nick uhost hand chan arg} {set url [lindex $arg 0]puts [http::data [http::geturl $url -binary boolean]]}</code></pre></div>i understand what you mean by outputting the file now you mention it it sounds logic is there an other way on doing this ? <br><br>what do you recommend but easy and simple so i can understand.<br><br>i also tryed "source path/http.tcl"<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3151">Ofloo</a> — Sat Jun 28, 2003 7:39 pm</p><hr />
]]></content>
	</entry>
	</feed>
