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

	<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>2007-10-14T02:52:26-04:00</updated>

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

		<entry>
		<author><name><![CDATA[rosc2112]]></name></author>
		<updated>2007-10-14T02:52:26-04:00</updated>

		<published>2007-10-14T02:52:26-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=76717#p76717</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=76717#p76717"/>
		<title type="html"><![CDATA[getting someting inside a dir]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=76717#p76717"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>set filesdir "/home/store"                        bind pub - !get pub:get        proc pub:get {nick uhost hand chan file} {        global filesdir        if {$file != ""} {                if {$file == "1"} {                        set filesdir "/path/to/dir1"                } elseif {$file == "2"} {                        set filesdir "/path/to/dir2"                } elseif {$file == "3"} {                        set filesdir "/path/to/dir3"                } else {                        # send an error message if the user doesn't give a valid number here..                        puthelp "NOTICE $nick :!get &lt;file&gt;"                        return                }                switch -- [dccsend $filesdir/$file\.txt $nick] {                        0 {                                     puthelp "NOTICE $nick :sending $file to you."                                dccsend $file $nick                        }                        1 { puthelp "NOTICE $nick :dcc table is full (too many connections), try to get $file later." }                        2 { puthelp "NOTICE $nick :can't open a socket for the transfer of $file." }                        3 { puthelp "NOTICE $nick :$file doesn't exist." }                        4 { puthelp "NOTICE $nick :$file was queued for later transfer." }                }        } else { puthelp "NOTICE $nick :!get &lt;file&gt;" }}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7395">rosc2112</a> — Sun Oct 14, 2007 2:52 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[pipo]]></name></author>
		<updated>2007-10-11T17:00:07-04:00</updated>

		<published>2007-10-11T17:00:07-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=76637#p76637</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=76637#p76637"/>
		<title type="html"><![CDATA[getting someting inside a dir]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=76637#p76637"><![CDATA[
Ok i use this code to get dcc send:<br><div class="codebox"><p>Code: </p><pre><code># dcc sends/recieves por Marco Ferra aka nXistence# http://clientes.netvisao.pt/mferra/# marcoferra@netvisao.pt# versao 1.0# !get &lt;file&gt;, !getlist# por aqui a path ate' 'a filesystem do botset filesdir "/home/store/"bind pub - !get pub:getproc pub:get {nick uhost hand chan file} {  global filesdir  if {$file != ""} {    switch -- [dccsend $filesdir/$file $nick] {    0 {      puthelp "NOTICE $nick :sending $file to you."      dccsend $file $nick    }    1 { puthelp "NOTICE $nick :dcc table is full (too many connections), try to get $file later." }    2 { puthelp "NOTICE $nick :can't open a socket for the transfer of $file." }    3 { puthelp "NOTICE $nick :$file doesn't exist." }    4 { puthelp "NOTICE $nick :$file was queued for later transfer." }    }  } else { puthelp "NOTICE $nick :!get &lt;file&gt; or !getlist" }}bind pub - !getlist pub:getlistproc pub:getlist {nick uhost handle chan arg} {  global filesdir  if {$arg != ""} { set cdir $filesdir/$arg } else { set cdir $filesdir }  set tdir [pwd]  cd $cdir  foreach fil "[glob *]" {    if {[file isdirectory $fil]} { puthelp "NOTICE $nick :$arg/$fil" }    if {[file isfile $fil]} { puthelp "NOTICE $nick :$arg/$fil (size: [file size $fil] bytes)" }  }  puthelp "NOTICE $nick :end of getlist!"  cd $tdir}putlog "tcl: dcc sends/recieves loaded"</code></pre></div>So it sends .txt files using the command.<br><br>Now some .txt files i upload have the same name, so what i need to do is create directories like 1, 2 etc and upload the .txt file to thoose dirs.<br><br>What i am looking for is a change in the scripts that allows me to do:<br><br>!get 1 and it will send the .txt that is in directory 1<br><br>Can this be done?<br><br>Thanks for the help<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8399">pipo</a> — Thu Oct 11, 2007 5:00 pm</p><hr />
]]></content>
	</entry>
	</feed>
