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

	<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>2002-06-05T19:01:00-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2002-06-05T19:01:00-04:00</updated>

		<published>2002-06-05T19:01:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=7718#p7718</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=7718#p7718"/>
		<title type="html"><![CDATA[Help with cd command]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=7718#p7718"><![CDATA[
 Sweet, now i see what that does. Though putting a / at the end of the directory still ended in a "No Such Such File or Directory". However, taking out &amp;&amp; ![string match "*.*" $chdir] of the code worked <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":smile:" title="Smile"> I still dont know why how that affected directories with a hyphen as well..<br><br> I understand its a poorly written script, but its the only working fserev script for b/x that I could find. I'll probably just keep modifying it until the script is completely rewritten.<br><br>&lt;font size=-1&gt;[ This Message was edited by: prizm on 2002-06-05 17:04 ]&lt;/font&gt;<p>Statistics: Posted by Guest — Wed Jun 05, 2002 7:01 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[stdragon]]></name></author>
		<updated>2002-06-05T03:09:00-04:00</updated>

		<published>2002-06-05T03:09:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=7675#p7675</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=7675#p7675"/>
		<title type="html"><![CDATA[Help with cd command]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=7675#p7675"><![CDATA[
It's awfully hard to read, especially with no formatting (try using the code directive), but the part that is messing up is where it matches against "*.*". It's not trying to expand the dir name, it's just seeing if there are any periods in it. It doesn't really make sense. The logic seems to be that if there is a period, the person must have typed a filename on accident (like cd pics/sheep.jpg or something), so it strips off everything after the last /. You might be able to 'fix' it by adding a / to the end of your cd command, e.g. "cd some.dir/"<br><br>I'd find a new script, because that one isn't "good" heh.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8">stdragon</a> — Wed Jun 05, 2002 3:09 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2002-06-04T16:44:00-04:00</updated>

		<published>2002-06-04T16:44:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=7659#p7659</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=7659#p7659"/>
		<title type="html"><![CDATA[Help with cd command]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=7659#p7659"><![CDATA[
 I am just learning TCL and am trying to modify this script. Everything works, except that it won't let me cd into a directory that contains charecters like periods and hyphens. I'm having a hard time figuring out what this is doing, but I think its trying to expand the current direcotry to *.* and then compare the cd arguments before changing to the new directory. Is this correct? Could this be where it is choking when the directory contains a period?<br><br> #Prog FLASH cd command<br>if {$args == "cd.."} {<br> set args "cd";<br> set filematch "..";<br>};<br>if [string match $args "cd" ] {<br> set chdir $filematch;<br> if {$chdir == ".."} {<br>  set newdir [string range $activedir 0 [expr [string last "/" $activedir]-1]];<br>  if {[string last "/" $activedir]&lt;0} { set newdir "." };<br>  set wholist [lreplace $wholist $infoseek [expr $infoseek+1] $ip $newdir]; set command 1<br> };#if<br>  if {$chdir == "/"} {set wholist [lreplace $wholist $infoseek [expr $infoseek+1] $ip "."]; set command 1<br> };#if<br> if {$command!=1 &amp;&amp; ![string match "*.*" $chdir]} {<br>  if {$chdir != ".."} {<br>   set chdir [string trimright $chdir "/"];<br>   if {[string match $activedir "."] &amp;&amp; [file isdirectory "$basedir/$chdir"]} {<br>    set wholist [lreplace $wholist $infoseek [expr $infoseek+1] $ip $chdir] ; set command 1<br>   };#if<br>   if {![string match $activedir "."] &amp;&amp; [file isdirectory "$basedir/$activedir/$chdir"]} {<br>    set chdir [string trimright $chdir "/"];<br>    set wholist [lreplace $wholist $infoseek [expr $infoseek+1] $ip "$activedir/$chdir"]; set command 1<br>   };#if<br>  };#if<br> };#if<br> if {$command==1} { ircii /msg =$name "^C15^B[^B^C12 [lindex $wholist [expr $infoseek+1]] ^B^C15]" };<br> if  {$command!=1} {<br>  ircii /msg =$name "No such directory!"<br>  set command 1<br> };#if<br>};#prog if cd<br><br>&lt;font size=-1&gt;[ This Message was edited by: prizm on 2002-06-04 14:45 ]&lt;/font&gt;<p>Statistics: Posted by Guest — Tue Jun 04, 2002 4:44 pm</p><hr />
]]></content>
	</entry>
	</feed>
