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

	<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-07-07T00:46:49-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Julia]]></name></author>
		<updated>2007-07-07T00:46:49-04:00</updated>

		<published>2007-07-07T00:46:49-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=74230#p74230</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=74230#p74230"/>
		<title type="html"><![CDATA[get.tcl dcc send]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=74230#p74230"><![CDATA[
I have just a little question.<br>Isn't possible to have the size of the file in Kb, Mb, Gb.<br><br>For example : <div class="codebox"><p>Code: </p><pre><code>[06:43] -Eggy|Fun-Frags- /hello.zip (size: 278477080 bytes)</code></pre></div>I'm a newbie in tcl scripting, but maybe  <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=9109">Julia</a> — Sat Jul 07, 2007 12:46 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Thunderdome]]></name></author>
		<updated>2005-04-25T08:45:55-04:00</updated>

		<published>2005-04-25T08:45:55-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=48535#p48535</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=48535#p48535"/>
		<title type="html"><![CDATA[get.tcl dcc send]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=48535#p48535"><![CDATA[
worked fine! thanks! <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=6079">Thunderdome</a> — Mon Apr 25, 2005 8:45 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[De Kus]]></name></author>
		<updated>2005-04-24T18:36:50-04:00</updated>

		<published>2005-04-24T18:36:50-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=48520#p48520</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=48520#p48520"/>
		<title type="html"><![CDATA[get.tcl dcc send]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=48520#p48520"><![CDATA[
load the module "filesys", dccsend is part of it.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2382">De Kus</a> — Sun Apr 24, 2005 6:36 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Thunderdome]]></name></author>
		<updated>2005-04-24T00:28:06-04:00</updated>

		<published>2005-04-24T00:28:06-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=48498#p48498</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=48498#p48498"/>
		<title type="html"><![CDATA[get.tcl dcc send]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=48498#p48498"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>###################################### Get.tcl by KuNgFo0 (www.eggfaq.com)#VERSION 0.3#DESCRIPTION Lets people access a specific directory and all its subdirectories to download files from.# Set the next line as the channels you want to run inset get(chans) "#channel"# Set the next line as the directory to allow access toset get(dir) "/home/blabla/public_html/stuff"# Set the next line as the command you wantset get(command) "!get"# Set the next line as the temp file to use to send the dir listingset get(file) "dirlisting.txt"proc xrange {xr xr1 xr2} { return [join [lrange [split $xr] $xr1 $xr2]]}proc xindex {xr xr1} { return [join [lrange [split $xr] $xr1 $xr1]]}proc pub_get {nick uhost hand chan arg} { global get botnick if {(([lsearch -exact [string tolower $get(chans)] [string tolower $chan]] != -1) || ($get(chans) == "*")) &amp;&amp; (![matchattr $hand b]) &amp;&amp; ($nick != $botnick)} {  msg_get $nick $uhost $hand $arg }}proc msg_get {nick uhost hand arg} { global get switch -exact -- [set command [string tolower [xindex $arg 0]]] {  "find" - "search" {   if {[set str [xrange $arg 1 end]] == ""} { puthelp "NOTICE $nick :Usage: $get(command) find &lt;file&gt;" } \   elseif {![get_valid $str]} { puthelp "NOTICE $nick :Error: Invalid filename" } \   else {    if {[file isdirectory [set tmp [file join $get(dir) $str]]]} {     set get(tdir) $tmp     set file "*"    } elseif {([string match */* $str]) &amp;&amp; ([file isdirectory [set tmp2 [file dirname $tmp]]])} {     set get(tdir) $tmp2     set file [file tail $tmp]    } else {     set get(tdir) $get(dir)     set file $str    }    set filelist ""    foreach {file1 file2} [get_list $get(tdir)] {     if {([string match *[string tolower $file]* [string tolower [file tail $file2]]])} {      if {[file isdirectory $file1]} { lappend filelist \002$file2/\002 } \      else { lappend filelist $file2 }     }    }    if {$filelist == ""} { set filelist "None" }    while {$filelist != ""} {     puthelp "NOTICE $nick :Matches found (\002$str\002) - [join [lrange $filelist 0 19] ", "]"     set filelist [lreplace $filelist 0 19]    }   }  }  "list" {   if {[catch {open $get(file) w} fileid]} { puthelp "NOTICE $nick :Error: Could not open temp file" } \   else {    fconfigure $fileid -translation "crlf" ; # Most people are probably using windows    puts $fileid "*** Listing contents of $get(dir) (* = new in last day)"    foreach i "dirs links files bytes" { set get($i) 0 }    get_write $fileid $get(dir)    puts $fileid "*** $get(dirs) dirs, $get(links) links, $get(files) files, $get(bytes) bytes"    close $fileid    get_send $nick $get(file)   }  }  "help" - "" {   puthelp "NOTICE $nick :Available commands:"   puthelp "NOTICE $nick :$get(command) find &lt;file&gt;"   puthelp "NOTICE $nick :$get(command) &lt;file&gt;"   puthelp "NOTICE $nick :$get(command) list"  }  default {   if {![get_valid [set file $arg]]} { puthelp "NOTICE $nick :Error: Invalid filename" } \   elseif {![file exists [set tmp [file join $get(dir) $file]]]} { puthelp "NOTICE $nick :Error: File '$tmp' does not exist" } \   else { get_send $nick $tmp }  } }}proc get_valid {file} { return [expr {(![string match *..* $file]) &amp;&amp; (![string equal [string index $file 0] "/"])}]}proc get_send {nick file} { switch -exact -- [dccsend $file $nick] {  0 { puthelp "NOTICE $nick :Sending [file tail $file]." }  1 { puthelp "NOTICE $nick :Error: Too many pending file requests. Try again later, thank you." }  2 { puthelp "NOTICE $nick :Error: Could not open socket. Please notify my admin, thank you." }  3 { puthelp "NOTICE $nick :Error: File does not exist. Please notify my admin, thank you." }  4 { puthelp "NOTICE $nick :Error: Too many file sends already in progress. Your request has been added to the queue, please wait." }  5 { puthelp "NOTICE $nick :Error: Could not move file to temporary directory. Please notify my admin, thank you." } }}proc get_list {what {pre ""}} { if {$pre == ""} { set pre $what } set files "" foreach file [lsort [glob -nocomplain [file join $what *]]] {  set file2 [string trimleft [string range $file [string length $pre] end] "./\\"] ; # the filename we actually show to the user  if {![file readable $file]} {   continue ; # ignore unreadable files  } elseif {[file isdirectory $file]} {   set files [concat $files $file $file2 [join [get_list $file $pre]]]  } else {   lappend files $file $file2  } } return $files}proc get_write {fileid what} { global get puts $fileid "/" foreach {file1 file2} [get_list $what] {  if {![catch {file type $file1} type]} {   switch -exact -- $type {    directory {     incr get(dirs)     set temp $file2/    }    link {     incr get(links)     if {[catch {file readlink $file1} temp]} { set temp "Could not eval symlink" }     set temp [format "%-60s %s" $file2 "--&gt; $temp"]    }    file {     incr get(files)     incr get(bytes) [set size [file size $file1]]     set temp [format "%-50s %10s" $file2 $size]    }     default {     incr get(files)     set temp $file2    }   }   if {[expr [clock seconds] - [file mtime $file1]] &lt; 86400} {    puts $fileid  "* $temp"   } else {    puts $fileid  "  $temp"   }  } }}set copy-to-tmp 1bind pub - $get(command) pub_getbind msg - $get(command) msg_getif {![file exists $get(dir)]} { if {[catch {file mkdir $get(dir)}]}     { putlog "Error: Could not create directory $get(dir)" }} elseif {![file isdirectory $get(dir)]} { putlog "Error: $get(dir) is not a directory" } \elseif {![file readable $get(dir)]}      { putlog "Error: $get(dir) is not readable" }putlog "*** Get.tcl 0.3 by KuNgFo0 loaded"</code></pre></div><br>This script sounds pretty usefull but I get<br><div class="codebox"><p>Code: </p><pre><code>Tcl error [pub_get]: invalid command name "dccsend"</code></pre></div>Does my eggdrop fail to have dccsend activated or something? Or is it some script error...?  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_sad.gif" width="15" height="15" alt=":(" title="Sad"> <br>Thanks and greetz   <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=":wink:" title="Wink"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6079">Thunderdome</a> — Sun Apr 24, 2005 12:28 am</p><hr />
]]></content>
	</entry>
	</feed>
