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

	<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-04-04T13:05:25-04:00</updated>

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

		<entry>
		<author><name><![CDATA[user]]></name></author>
		<updated>2003-04-04T13:05:25-04:00</updated>

		<published>2003-04-04T13:05:25-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=18587#p18587</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=18587#p18587"/>
		<title type="html"><![CDATA[listing files in a directory]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=18587#p18587"><![CDATA[
A tip to all of you: glob -nocomplain<br>(look that up in the manual ;P)<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2878">user</a> — Fri Apr 04, 2003 1:05 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2003-04-04T12:58:02-04:00</updated>

		<published>2003-04-04T12:58:02-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=18585#p18585</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=18585#p18585"/>
		<title type="html"><![CDATA[listing files in a directory]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=18585#p18585"><![CDATA[
Hehe, I was kidding. I'm glad to hear I've helped you, somehow. Your welcome. <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=187">caesar</a> — Fri Apr 04, 2003 12:58 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Pitchat]]></name></author>
		<updated>2003-04-04T12:53:40-04:00</updated>

		<published>2003-04-04T12:53:40-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=18584#p18584</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=18584#p18584"/>
		<title type="html"><![CDATA[listing files in a directory]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=18584#p18584"><![CDATA[
i did thank you and i am grateful for your patience and knowledge<br><br>to answer your question the script in its "basic version" works well<br>it is juste the part where i`d try to have it display one item per lines that i am unable to make it work and i know it is because of my lack of experience in tcl, i`m working on it <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink"><br><br>thanks again and dont let people like me down there are many more good people like me who want to learn and needs good teachers <br><br> <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"> <br>Pitchat<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2723">Pitchat</a> — Fri Apr 04, 2003 12:53 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2003-04-04T06:12:46-04:00</updated>

		<published>2003-04-04T06:12:46-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=18553#p18553</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=18553#p18553"/>
		<title type="html"><![CDATA[listing files in a directory]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=18553#p18553"><![CDATA[
So it working or not? <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"> Your welcome anyway..<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Fri Apr 04, 2003 6:12 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Pitchat]]></name></author>
		<updated>2003-04-04T05:58:26-04:00</updated>

		<published>2003-04-04T05:58:26-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=18552#p18552</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=18552#p18552"/>
		<title type="html"><![CDATA[listing files in a directory]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=18552#p18552"><![CDATA[
thanks for everything<br><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=2723">Pitchat</a> — Fri Apr 04, 2003 5:58 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2003-04-04T05:50:02-04:00</updated>

		<published>2003-04-04T05:50:02-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=18551#p18551</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=18551#p18551"/>
		<title type="html"><![CDATA[listing files in a directory]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=18551#p18551"><![CDATA[
What the heck are you doing there? <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"> Here is the final and working smoothly version of the code I've did:<div class="codebox"><p>Code: </p><pre><code>set poemsdir "c://precieuse//histoires"bind pub * !poems pub:poemsproc pub:poems {nick host handle channel text} {catch { glob -type f $::poemsdir/* } poemsregsub -all "//" $::poemsdir "/" reglineregsub -all "$::regline/" $poems "" poems putserv "PRIVMSG $channel :\002Poems\002: $poems"}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Fri Apr 04, 2003 5:50 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Pitchat]]></name></author>
		<updated>2003-04-04T05:43:03-04:00</updated>

		<published>2003-04-04T05:43:03-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=18550#p18550</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=18550#p18550"/>
		<title type="html"><![CDATA[listing files in a directory]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=18550#p18550"><![CDATA[
still dont work <br>maybe i messed up with the last change<br><br>&lt;Precieuse&gt; [04:38] Tcl error [pub:poems]: can't read "poems": no such variable<br><br>this is what the script look like now<br><div class="codebox"><p>Code: </p><pre><code>set poemsdir "c://precieuse//histoires" set regline "c:/precieuse/histoires"set poemlimit 3 bind pub * !histoire pub:poems proc pub:poems {nick host handle channel text} {   if {![file exists $::poemsdir]} {     putserv "PRIVMSG $channel :\002Error\002: $::poemsdir dose not exist."     return 0   } proc pub:poems {nick host handle channel text} { catch { glob -type f $::poemsdir/* } poems regsub -all "$::regline/" $poems "" poems putserv "PRIVMSG $channel :\002Poems\002: $poems" }   set first [list]   foreach item $poems {     if {[llength $first] == $::poemlimit} {       putserv "PRIVMSG $channel :\002Histoires\002: [string trimright [join $first ", "] ", "]"       set first [list]     }     lappend fist $item   }   if {[llength $first]} {     putserv "PRIVMSG $channel :\002Histoires\002: [string trimright [join $first ", "] ", "]"   } } </code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2723">Pitchat</a> — Fri Apr 04, 2003 5:43 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2003-04-04T05:27:46-04:00</updated>

		<published>2003-04-04T05:27:46-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=18549#p18549</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=18549#p18549"/>
		<title type="html"><![CDATA[listing files in a directory]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=18549#p18549"><![CDATA[
The 'poemsdir' should be like: set poemsdir "c://precieuse//histoires" if I'm not wrong and the regsub line needs to be changed. It should look like:<div class="codebox"><p>Code: </p><pre><code>set poemsdir "c://precieuse//histoires"set regline "c:/precieuse/histoires"bind pub * !poems pub:poemsproc pub:poems {nick host handle channel text} {catch { glob -type f $::poemsdir/* } poemsregsub -all "$::regline/" $poems "" poemsputserv "PRIVMSG $channel :\002Poems\002: $poems"}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Fri Apr 04, 2003 5:27 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Pitchat]]></name></author>
		<updated>2003-04-04T05:21:31-04:00</updated>

		<published>2003-04-04T05:21:31-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=18548#p18548</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=18548#p18548"/>
		<title type="html"><![CDATA[listing files in a directory]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=18548#p18548"><![CDATA[
arf just saw it after i did the last post but this time no crashes but when i type my pub command nothing append no error and no display<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2723">Pitchat</a> — Fri Apr 04, 2003 5:21 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[stdragon]]></name></author>
		<updated>2003-04-04T05:18:54-04:00</updated>

		<published>2003-04-04T05:18:54-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=18547#p18547</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=18547#p18547"/>
		<title type="html"><![CDATA[listing files in a directory]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=18547#p18547"><![CDATA[
You really could use some coffee! You forgot another character, this time the final } in the code.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8">stdragon</a> — Fri Apr 04, 2003 5:18 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Pitchat]]></name></author>
		<updated>2003-04-04T05:14:29-04:00</updated>

		<published>2003-04-04T05:14:29-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=18546#p18546</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=18546#p18546"/>
		<title type="html"><![CDATA[listing files in a directory]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=18546#p18546"><![CDATA[
it is worst now the bot crashes<br><div class="codebox"><p>Code: </p><pre><code>set poemsdir "/precieuse/histoires/" set peomlimit 7 bind pub * !histoire pub:poems proc pub:poems {nick host handle channel text} {   if {![file exists $::poemsdir]} {     putserv "PRIVMSG $channel :\002Error\002: $::poemsdir dose not exist."     return 0   }   catch { glob -type f $::poemsdir/ } poems   regsub -all "$::poemsdir/*" $poems "" poems   set first [list]   foreach item $poems {     if {[llength $first] == $::peomlimit} {       putserv "PRIVMSG $channel :\002Histoires\002: [string trimright [join $first ", "] ", "]"       set first [list]     }     lappend fist $item   }   if {[llength $first]} {     putserv "PRIVMSG $channel :\002Histoires\002: [string trimright [join $first ", "] ", "]"   } </code></pre></div>it`s the whole code including the latest change you gave me<br><br>now the error message <br><br>&lt;Precieuse&gt; [04:07] Tcl error in file 'config.txt':<br>&lt;Precieuse&gt; [04:07] wrong # args: should be "proc name args body"<br>[04:07] (Precieuse): while executing<br>[04:07] (Precieuse): "proc pub:poems {nick host handle channel text} {<br>[04:07] (Precieuse): if {![file exists $::poemsdir]} {<br>[04:07] (Precieuse): putserv "PRIVMSG $channel :\002Error\002: $::poemsdir dose ..."<br>[04:07] (Precieuse): (file "scripts/listing2.tcl" line 6)<br><br>thanks<br>P.S. i could use some of that coffee myself  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile">[/quote]<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2723">Pitchat</a> — Fri Apr 04, 2003 5:14 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ppslim]]></name></author>
		<updated>2003-04-04T04:55:13-04:00</updated>

		<published>2003-04-04T04:55:13-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=18544#p18544</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=18544#p18544"/>
		<title type="html"><![CDATA[listing files in a directory]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=18544#p18544"><![CDATA[
Don't worry, my fault, hoenst.<br><br>I am waiting for Slennox to install the coffee machine facility here, as I need it badly <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_razz.gif" width="15" height="15" alt=":P" title="Razz"><br><br>Look though the code for "[length $first]". Near the bottom of the code.<br><br>Change it to "[llength $first]". Note the extra/missing l.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2">ppslim</a> — Fri Apr 04, 2003 4:55 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Pitchat]]></name></author>
		<updated>2003-04-04T04:50:03-04:00</updated>

		<published>2003-04-04T04:50:03-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=18543#p18543</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=18543#p18543"/>
		<title type="html"><![CDATA[listing files in a directory]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=18543#p18543"><![CDATA[
[03:47] Tcl error [pub:poems]: invalid command name "length"<br><br> <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_redface.gif" width="15" height="15" alt=":oops:" title="Embarassed"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2723">Pitchat</a> — Fri Apr 04, 2003 4:50 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ppslim]]></name></author>
		<updated>2003-04-04T04:42:24-04:00</updated>

		<published>2003-04-04T04:42:24-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=18542#p18542</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=18542#p18542"/>
		<title type="html"><![CDATA[listing files in a directory]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=18542#p18542"><![CDATA[
Bordome will prevail<br><div class="codebox"><p>Code: </p><pre><code>set poemsdir "/precieuse/histoires/" set peomlimit 7bind pub * !poems pub:poems proc pub:poems {nick host handle channel text} {   if {![file exists $::poemsdir]} {     putserv "PRIVMSG $channel :\002Error\002: $::poemsdir dose not exist."     return 0   }   catch { glob -type f $::poemsdir/ } poems   regsub -all "$::poemsdir/*" $poems "" poems   set first [list]  foreach item $poems {    if {[llength $first] == $::peomlimit} {      putserv "PRIVMSG $channel :\002Histoires\002: [string trimright [join $first ", "] ", "]"      set first [list]    }    lappend fist $item  }  if {[length $first]} {    putserv "PRIVMSG $channel :\002Histoires\002: [string trimright [join $first ", "] ", "]"  }}</code></pre></div>Change the "set peomlimit" line, to the amount of peoms you wish to display on a single line.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2">ppslim</a> — Fri Apr 04, 2003 4:42 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Pitchat]]></name></author>
		<updated>2003-04-04T04:11:16-04:00</updated>

		<published>2003-04-04T04:11:16-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=18536#p18536</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=18536#p18536"/>
		<title type="html"><![CDATA[listing files in a directory]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=18536#p18536"><![CDATA[
U are right now it works <br>my mistake....<br><br>now is there a way to make the list more "esthetic" it display all filenames one after another on the same line and i`d like to have it one fileneme by line <br><br>i know i`m pulling my luck a lot   <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"> <br>thank you very much for your patience and for sharing your knowledge<br><br>Pitchat<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2723">Pitchat</a> — Fri Apr 04, 2003 4:11 am</p><hr />
]]></content>
	</entry>
	</feed>
