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

	<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>2010-07-05T03:44:57-04:00</updated>

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

		<entry>
		<author><name><![CDATA[doggo]]></name></author>
		<updated>2010-07-05T03:44:24-04:00</updated>

		<published>2010-07-05T03:44:24-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=93456#p93456</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=93456#p93456"/>
		<title type="html"><![CDATA[[solved]how to read a text file top to bottom ??]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=93456#p93456"><![CDATA[
thanks dude, works perfectly now <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><br><br>if you get on EFNET #mp3.spam to see it working <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=11046">doggo</a> — Mon Jul 05, 2010 3:44 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[horgh]]></name></author>
		<updated>2010-07-04T20:16:29-04:00</updated>

		<published>2010-07-04T20:16:29-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=93451#p93451</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=93451#p93451"/>
		<title type="html"><![CDATA[[solved]how to read a text file top to bottom ??]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=93451#p93451"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code># Rls: track_list.v1.0.tcl# Date: 19/06/10# Coded by: SaNcTuM# Contact: #a.b.inner-sanctum@EFNET###################################bind PUB - -tlist SaNcTuM_tracksset track_list "/home/eggdrop/requests/track_lists"proc SaNcTuM_tracks {nick uhost hand chan text} {    set number [lindex [split $text] 0]    set filename ${::track_list}/${number}.txt    if {![file exists $filename]} {        putquick "NOTICE $nick :Track list file not found."        return    }    set tracks [open $filename]    set data [split [read -nonewline $tracks] \n]    close $tracks    foreach music_info $data {        putquick "NOTICE $nick :\00315$music_info"    } }putlog "track_list.v1.0 LOADED"</code></pre></div>It's probably showing in reverse due to utimer. There's no need to use utimer here I think as putquick is already queued.<br><br>I made it extract argument more correctly and added the check for if file doesn't exist.<br><br>But I didn't test this so ;p<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11103">horgh</a> — Sun Jul 04, 2010 8:16 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[doggo]]></name></author>
		<updated>2010-07-05T03:44:57-04:00</updated>

		<published>2010-07-04T13:53:05-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=93447#p93447</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=93447#p93447"/>
		<title type="html"><![CDATA[[solved]how to read a text file top to bottom ??]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=93447#p93447"><![CDATA[
my script reads from a txt file that looks like this <br><div class="codebox"><p>Code: </p><pre><code>Track list for - Vertex_-_Archipelago-(TESD001)-WEB-2010-HQEM-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-01-vertex-oceanos.mp302-vertex-archipelago.mp303-vertex-hungary_dance.mp304-float_and_vertex-oceansphere.mp3</code></pre></div>heres the script...<br><div class="codebox"><p>Code: </p><pre><code># Rls: track_list.v1.0.tcl# Date: 19/06/10# Coded by: SaNcTuM# Contact: #a.b.inner-sanctum@EFNET###################################bind PUB - -tlist SaNcTuM_tracksset track_list "/home/eggdrop/requests/track_lists"proc SaNcTuM_tracks {nick uhost hand chan text} {    set tracks [open $::track_list/[lindex $text 0].txt r]    set data [split [read -nonewline $tracks] \n]    close $tracks    foreach music_info $data {        utimer 3 [list putquick "NOTICE $nick :\00315$music_info"]    }    return 0 } putlog "track_list.v1.0 LOADED"</code></pre></div>but it reads the .txt file from the bottom up :/<br><div class="codebox"><p>Code: </p><pre><code>[18:51] &lt;@mojo&gt; -tlist 31810[18:51] -moopig- 04-float_and_vertex-oceansphere.mp3[18:51] -moopig- 03-vertex-hungary_dance.mp3[18:51] -moopig- 02-vertex-archipelago.mp3[18:51] -moopig- 01-vertex-oceanos.mp3[18:51] -moopig- -~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-[18:51] -moopig- Track list for - Vertex_-_Archipelago-(TESD001)-WEB-2010-HQEM</code></pre></div>i would also like it to notice the user if there is no file to display <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><br>thanks guys.. <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=11046">doggo</a> — Sun Jul 04, 2010 1:53 pm</p><hr />
]]></content>
	</entry>
	</feed>
