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

	<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>2006-07-05T01:24:42-04:00</updated>

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

		<entry>
		<author><name><![CDATA[metroid]]></name></author>
		<updated>2006-07-05T01:24:42-04:00</updated>

		<published>2006-07-05T01:24:42-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=64494#p64494</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=64494#p64494"/>
		<title type="html"><![CDATA[read txt file]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=64494#p64494"><![CDATA[
posting your script might work? <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_rolleyes.gif" width="15" height="15" alt=":roll:" title="Rolling Eyes"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5078">metroid</a> — Wed Jul 05, 2006 1:24 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sir_Cedric_Lex2]]></name></author>
		<updated>2006-07-03T09:19:54-04:00</updated>

		<published>2006-07-03T09:19:54-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=64478#p64478</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=64478#p64478"/>
		<title type="html"><![CDATA[read txt file]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=64478#p64478"><![CDATA[
I have a problem with a similar tcl...<br>the programm reads the file, but if thers a "space" character the rest of the line ist missing<br><br>for example:<br><br>(Google) !google, !g, !search<br><br>draws only<br><br>(Google)<br><br>and the rest (!google, !g, !search) of the line is missing...<br><br>please help<br><br>greetz<br><br>Sir Cedric Lex<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7930">Sir_Cedric_Lex2</a> — Mon Jul 03, 2006 9:19 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[De Kus]]></name></author>
		<updated>2006-06-07T03:56:43-04:00</updated>

		<published>2006-06-07T03:56:43-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=63787#p63787</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=63787#p63787"/>
		<title type="html"><![CDATA[read txt file]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=63787#p63787"><![CDATA[
this is because the code does the same as DragnLord's code... you of course need to replace the previous reading and splitting with the new one <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy">.<div class="codebox"><p>Code: </p><pre><code>proc file:read {n u h c t} {  set fl [open $::fileread]  set lines [split [read $fl] \n]  close $fl  ...}</code></pre></div>But as said... due the lag from IRC you will most likely not notice anything. On small files (less than 1mb?) it is be even ~1ms slower (about half the time per iteration with time), since it has more function calls ^-^.<br>As mentioned... I dont know what kind of speed you except. Bots usual respond time is 1-2sec. You have to edit your source or use putdccraw to skip all queues which will get you flood kicked for sure, unless you have IRCOp control of the server the bot is connected to.<br><br>In case your bot really needs a few seconds to read the file, it must be your shells fault, since on shells I know it reads like a few lines within a few ms. So anything smal enough to be redirected to IRC should be read with both functions within a time you cannot notice as a human.<br><br>Edit: I noticed I could put together the befits of both <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy">. Less function calls and less memory copies <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy">.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2382">De Kus</a> — Wed Jun 07, 2006 3:56 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[pstruh]]></name></author>
		<updated>2006-06-07T03:35:43-04:00</updated>

		<published>2006-06-07T03:35:43-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=63784#p63784</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=63784#p63784"/>
		<title type="html"><![CDATA[read txt file]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=63784#p63784"><![CDATA[
I modify the code like that:<br><div class="codebox"><p>Code: </p><pre><code>proc file:read {n u h c t} {  set fl [open $::fileread]  set data [read $fl]  set lines [split $data \n]    while {![eof $fl]} {        lappend lines [gets $fi]                      }  close $fl  foreach x $lines {    putquick "privmsg $c $x"  }}</code></pre></div>but I cant see any different of speed reading file beetwen previous code and this code.<br><br>Is possible an error in script ....??<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6031">pstruh</a> — Wed Jun 07, 2006 3:35 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[De Kus]]></name></author>
		<updated>2006-06-06T19:29:46-04:00</updated>

		<published>2006-06-06T19:29:46-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=63781#p63781</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=63781#p63781"/>
		<title type="html"><![CDATA[read txt file]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=63781#p63781"><![CDATA[
what now? delay or faster?<br>using<div class="codebox"><p>Code: </p><pre><code>  while {![eof $fl]} {    lappend lines [gets $fi]  }  close $fl</code></pre></div>would decrease memory usuage and therefore might speed up a little on really large files... but... no idea what could be faster, else you want to use some floody speed and use putquick or even putdccraw ^-^.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2382">De Kus</a> — Tue Jun 06, 2006 7:29 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[pstruh]]></name></author>
		<updated>2006-06-06T15:58:46-04:00</updated>

		<published>2006-06-06T15:58:46-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=63772#p63772</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=63772#p63772"/>
		<title type="html"><![CDATA[read txt file]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=63772#p63772"><![CDATA[
<blockquote class="uncited"><div><div class="codebox"><p>Code: </p><pre><code>set fileread "filetest"bind pub - !users file:readproc file:read {n u h c t} {  set fl [open $::fileread]  set data [read $fl]  close $fl  set lines [split $data \n]  foreach x $lines {    putserv "privmsg $c $x"  }}</code></pre></div></div></blockquote>Cau you help me how to read file with delay? I want to read file faster.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6031">pstruh</a> — Tue Jun 06, 2006 3:58 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[whittinghamj]]></name></author>
		<updated>2006-05-26T00:53:36-04:00</updated>

		<published>2006-05-26T00:53:36-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=63401#p63401</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=63401#p63401"/>
		<title type="html"><![CDATA[read txt file]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=63401#p63401"><![CDATA[
thanks buddy - you star you <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_razz.gif" width="15" height="15" alt=":P" title="Razz"><br><br>god bless<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7783">whittinghamj</a> — Fri May 26, 2006 12:53 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[DragnLord]]></name></author>
		<updated>2006-05-26T00:09:12-04:00</updated>

		<published>2006-05-26T00:09:12-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=63400#p63400</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=63400#p63400"/>
		<title type="html"><![CDATA[read txt file]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=63400#p63400"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>set fileread "filetest"bind pub - !users file:readproc file:read {n u h c t} {  set fl [open $::fileread]  set data [read $fl]  close $fl  set lines [split $data \n]  foreach x $lines {    putserv "privmsg $c $x"  }}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4461">DragnLord</a> — Fri May 26, 2006 12:09 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[whittinghamj]]></name></author>
		<updated>2006-05-25T22:51:31-04:00</updated>

		<published>2006-05-25T22:51:31-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=63398#p63398</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=63398#p63398"/>
		<title type="html"><![CDATA[read txt file]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=63398#p63398"><![CDATA[
drag - that just reads one file tho buddy. I need it to read / list all the lines <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_razz.gif" width="15" height="15" alt=":P" title="Razz"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7783">whittinghamj</a> — Thu May 25, 2006 10:51 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[whittinghamj]]></name></author>
		<updated>2006-05-25T22:50:49-04:00</updated>

		<published>2006-05-25T22:50:49-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=63397#p63397</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=63397#p63397"/>
		<title type="html"><![CDATA[read txt file]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=63397#p63397"><![CDATA[
no [censored] - lmfao hey man<br><br>hows it going  fancy seeing you here.<br><br>cheers buddy.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7783">whittinghamj</a> — Thu May 25, 2006 10:50 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[DragnLord]]></name></author>
		<updated>2006-05-25T22:43:34-04:00</updated>

		<published>2006-05-25T22:43:34-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=63395#p63395</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=63395#p63395"/>
		<title type="html"><![CDATA[read txt file]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=63395#p63395"><![CDATA[
Step one, have Wolfie smack you for not asking me first.<br>Step two, look <a href="http://forum.egghelp.org/viewtopic.php?t=11902" class="postlink"><strong class="text-strong">here</strong></a><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4461">DragnLord</a> — Thu May 25, 2006 10:43 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[whittinghamj]]></name></author>
		<updated>2006-05-25T22:35:30-04:00</updated>

		<published>2006-05-25T22:35:30-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=63394#p63394</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=63394#p63394"/>
		<title type="html"><![CDATA[read txt file]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=63394#p63394"><![CDATA[
Good evening yall.<br><br>I have been reading the forum's and not getting very fare. Its been one of those days. I know its on the board somewhere but I cannot find it.<br><br>I have a file which contains a user's nick and then a timestamp. We use it to keep track of when users where first seen on our channel.<br><br>The question I have is this. I want to be able to type !users and eggie goes off and lists every line in the text file eg<br><br>&lt;User&gt;!users<br>&lt;bot&gt;nick1 2006 05 05<br>&lt;bot&gt; nick2 2005 05 01<br><br>etc.<br><br>It does not need to re-order the lines or anything just read them out as they are shown in the txt file.<br><br>Here is an example of exactly how the text file looks.<br><div class="codebox"><p>Code: </p><pre><code>Quest 2006 05 21 19 27Wolfie 2006 05 23 19 34Ladybug 2006 05 23 19 38NeXXtea 2006 05 23 19 39</code></pre></div>Any help would be extremly helpful.<br><br>Kind Regards and god bless<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7783">whittinghamj</a> — Thu May 25, 2006 10:35 pm</p><hr />
]]></content>
	</entry>
	</feed>
