<?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/11000" />

	<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>2005-12-20T23:21:08-04:00</updated>

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

		<entry>
		<author><name><![CDATA[demond]]></name></author>
		<updated>2005-12-20T23:21:08-04:00</updated>

		<published>2005-12-20T23:21:08-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=58529#p58529</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=58529#p58529"/>
		<title type="html"><![CDATA[Help with egghelp.tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=58529#p58529"><![CDATA[
nope, it's bug in your script or/and your logic<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5056">demond</a> — Tue Dec 20, 2005 11:21 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ryal]]></name></author>
		<updated>2005-12-20T12:02:34-04:00</updated>

		<published>2005-12-20T12:02:34-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=58509#p58509</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=58509#p58509"/>
		<title type="html"><![CDATA[Help with egghelp.tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=58509#p58509"><![CDATA[
I get exactly the same result without the "-command".<br>Could this be a bug from the http package?<br>PS: sorry the for quote instead of code; i just fixed it<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6222">ryal</a> — Tue Dec 20, 2005 12:02 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[demond]]></name></author>
		<updated>2005-12-16T23:26:53-04:00</updated>

		<published>2005-12-16T23:26:53-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=58359#p58359</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=58359#p58359"/>
		<title type="html"><![CDATA[Help with egghelp.tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=58359#p58359"><![CDATA[
try using it in the simpler, blocking form first - i.e. without <em class="text-italics">-command</em> switch<br><br>and use <div class="codebox"><p>Code: </p><pre><code> tag when posting code, not [quote]</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5056">demond</a> — Fri Dec 16, 2005 11:26 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ryal]]></name></author>
		<updated>2005-12-20T12:03:09-04:00</updated>

		<published>2005-12-16T06:08:16-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=58348#p58348</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=58348#p58348"/>
		<title type="html"><![CDATA[Help with egghelp.tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=58348#p58348"><![CDATA[
Thx for the tip, didnt know there was a built in package.<br>Anyway, i still get the same error (that is http::data returns an empty string, no url data). Heres the new code:<br><br><div class="codebox"><p>Code: </p><pre><code>proc parse_proc { nick uhost handle arg } {global sockset url "http://www.google.com"set target $nickset sock [::http::geturl $url -command [list parseinfo $target $url] -timeout 60]puthelp "PRIVMSG $target :$url"}proc parseinfo {target url sock} {set body [::http::data $sock]::http::cleanup $sockset body2 [string range $body 0 [string first $body "\n"]]puthelp "PRIVMSG $target :hello"puthelp "PRIVMSG $target :$body hello2"}</code></pre></div>It displays the url, "hello" and then "hello2" with nothing in front of it.<br>Any ideas?<br><br>PS: of course the timer wasnt 10' at first <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink"> i just wanted to know if it could be a timer pb so i put an extra large.<br>Thanks for your help guys!<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6222">ryal</a> — Fri Dec 16, 2005 6:08 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[demond]]></name></author>
		<updated>2005-12-16T03:09:01-04:00</updated>

		<published>2005-12-16T03:09:01-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=58337#p58337</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=58337#p58337"/>
		<title type="html"><![CDATA[Help with egghelp.tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=58337#p58337"><![CDATA[
egghttp is outdated, do not use it<br><br>use Tcl's built-in http package instead<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5056">demond</a> — Fri Dec 16, 2005 3:09 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[De Kus]]></name></author>
		<updated>2005-12-15T20:21:42-04:00</updated>

		<published>2005-12-15T20:21:42-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=58323#p58323</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=58323#p58323"/>
		<title type="html"><![CDATA[Help with egghelp.tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=58323#p58323"><![CDATA[
3 things:<br>- try using a shorter timeout than 10min <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"><br>- try using the header line "Connection: close"<br>- Try passing only the first line to puthelp via [string range $body 0 [string first $body "\n"]]. That saves your bot getting various errors from IRC Server and most likely getting spammed out (if it isnt trimmed to 510 bytes anyway)<br><br>Btw. headers also contain about 5-10 lines depending on HTTP server.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2382">De Kus</a> — Thu Dec 15, 2005 8:21 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ryal]]></name></author>
		<updated>2005-12-15T13:17:48-04:00</updated>

		<published>2005-12-15T13:17:48-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=58293#p58293</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=58293#p58293"/>
		<title type="html"><![CDATA[Help with egghelp.tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=58293#p58293"><![CDATA[
Hi !<br>Im trying to parse the content of a webpage but it doesnt work (it does tho with some webpages but not with <a href="http://www.google.com" class="postlink">www.google.com</a>).<br>Heres the code i use:<br><blockquote class="uncited"><div>proc parse_proc { nick uhost handle arg } {<br>global mychan sock<br><br>set d [date:offset [clock seconds] %m%d%y] <br>set url "<a href="http://www.google.com" class="postlink">http://www.google.com</a>"<br>set target $nick<br>set sock [egghttp:geturl $url [list parseinfo $target $url] -timeout 600]<br>puthelp "PRIVMSG $target :$url"<br>}<br><br>proc parseinfo {target url sock} {<br>set headers [egghttp:headers $sock]<br>set body [egghttp:data $sock]<br>puthelp "PRIVMSG $target :hello"<br>puthelp "PRIVMSG $target :$headers"<br>puthelp "PRIVMSG $target :$body"<br>}</div></blockquote>It displays the right url, "hello" and then nothing. I know body is a big variable but it should display the first line (which it does for some websites, but not with google). Of course i loaded egghelp.tcl in my *.conf and it loads alright.<br>What did i do wrong? i do believe the error stands in the way i call egghttp:geturl but i dont know how to fix it<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6222">ryal</a> — Thu Dec 15, 2005 1:17 pm</p><hr />
]]></content>
	</entry>
	</feed>
