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

	<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-27T07:47:24-04:00</updated>

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

		<entry>
		<author><name><![CDATA[MC_8]]></name></author>
		<updated>2003-04-27T07:47:24-04:00</updated>

		<published>2003-04-27T07:47:24-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=19506#p19506</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=19506#p19506"/>
		<title type="html"><![CDATA[Listing directory]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=19506#p19506"><![CDATA[
By the way<div class="codebox"><p>Code: </p><pre><code>set what [lindex $arg 0]</code></pre></div>Should be<div class="codebox"><p>Code: </p><pre><code>set what [lindex [split $arg] 0]</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3080">MC_8</a> — Sun Apr 27, 2003 7:47 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[MC_8]]></name></author>
		<updated>2003-04-27T07:45:38-04:00</updated>

		<published>2003-04-27T07:45:38-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=19505#p19505</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=19505#p19505"/>
		<title type="html"><![CDATA[Listing directory]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=19505#p19505"><![CDATA[
You can use the 'glob' command to have it list.<br>See:  <a href="http://tcl.activestate.com/man/tcl8.3/TclCmd/glob.htm" class="postlink">http://tcl.activestate.com/man/tcl8.3/TclCmd/glob.htm</a><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3080">MC_8</a> — Sun Apr 27, 2003 7:45 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2003-02-05T04:44:50-04:00</updated>

		<published>2003-02-05T04:44:50-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=16178#p16178</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=16178#p16178"/>
		<title type="html"><![CDATA[Listing directory]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=16178#p16178"><![CDATA[
Im hoping someone may be able to give me a hand with a little script that will list all files in a dircetory. I have one so far that works with eggdrop to add and remove a dir, but id like my egg to also list whats there (for ftp requests, etc) here's what i have so far for adding/deleting:<br><br>the .sh file:<br><br>REQDIR="/glftpd/site/Requests"<br>SITENAME="IcD"<br><br>if [ "$1" = "" ]; then<br>    echo "Use it correctly"<br>    exit 0<br>else<br>    <br>if [ "$1" = "add" ]; then<br>        <br>    if [ "$2" = "" ]; then<br>    echo "Specify a request... Usage: !req &lt;release&gt;"<br>    exit 0<br>    else<br>        ALREADYTHERE="$( ls $REQDIR | grep $2 )"<br>        if [ "$ALREADYTHERE" = "" ]; then<br>        mkdir $REQDIR/$2-$3<br>        echo "-$SITENAME- [REQ] + New Request: $2 by $3"<br>        else<br>        echo "Request already exsists, you sure you got it right?"<br>        exit 0<br>        fi<br>    fi<br><br>else<br>if [ "$1" = "del" ]; then<br><br>    if [ "$2" = "" ]; then<br>        echo "Specify a request to delete... Usage: !delreq &lt;release&gt;"<br>        exit 0<br>    else<br>        ALREADYTHERE="$( ls $REQDIR | grep $2 )"<br>        if [ "$ALREADYTHERE" != "" ]; then<br>        rm -fr $REQDIR/$ALREADYTHERE<br>        echo "-$SITENAME- [REQ] - Deleted Request: $ALREADYTHERE"<br>        else<br>        echo "No request named like that, try to rephrase"<br>        exit 0<br>        fi<br>    fi<br>fi<br>fi<br>fi<br>exit 0<br><br>and the .tcl file :<br><br>bind pub - !req pub:req<br>bind pub - !delreq pub:delreq<br><br>proc pub:req {nick uhost handle chan arg} {<br> set binary {/glftpd/bin/request.sh}<br> set what [lindex $arg 0]<br> set output [exec $binary add $what $nick]<br>    puthelp "PRIVMSG $chan :$output"<br>}<br><br>proc pub:delreq {nick uhost handle chan arg} {<br> set binary {/glftpd/bin/request.sh}<br> set what [lindex $arg 0]<br> set output [exec $binary del $what]<br>    puthelp "PRIVMSG $chan :$output"<br>}<br><br>putlog "request.tcl loaded"<br><br>if anyone may be able to help me with the dir listing part, id be forever grateful <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile">)<p>Statistics: Posted by Guest — Wed Feb 05, 2003 4:44 am</p><hr />
]]></content>
	</entry>
	</feed>
