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

	<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>2010-09-13T03:27:53-04:00</updated>

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

		<entry>
		<author><name><![CDATA[raider2k]]></name></author>
		<updated>2010-09-13T03:27:53-04:00</updated>

		<published>2010-09-13T03:27:53-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=94360#p94360</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=94360#p94360"/>
		<title type="html"><![CDATA[[SOLVED] exec command stopped working after upgrade]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=94360#p94360"><![CDATA[
btw: I like to use<div class="codebox"><p>Code: </p><pre><code>if { [catch { .... } error0] } {putlog "procname/partname - $error0"return 0}</code></pre></div>which helps out quite a lot<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9589">raider2k</a> — Mon Sep 13, 2010 3:27 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[dj-zath]]></name></author>
		<updated>2010-09-11T16:43:29-04:00</updated>

		<published>2010-09-11T16:43:29-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=94346#p94346</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=94346#p94346"/>
		<title type="html"><![CDATA[[SOLVED] exec command stopped working after upgrade]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=94346#p94346"><![CDATA[
nml.. you're a GENIUS!<br><br>looks like everythings back online   could not have done it without your help!<br><br>I owe you so many beers.... <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><br>(I wonder if I could pay ya to rewrite this thing <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":-)" title="Smile">)<br><br>-DjZ-<br><img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"> <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=10318">dj-zath</a> — Sat Sep 11, 2010 4:43 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[dj-zath]]></name></author>
		<updated>2010-09-11T16:07:20-04:00</updated>

		<published>2010-09-11T16:07:20-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=94344#p94344</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=94344#p94344"/>
		<title type="html"><![CDATA[[SOLVED] exec command stopped working after upgrade]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=94344#p94344"><![CDATA[
DING DING DING!<br><br>I think I got it....<br><br><br>I had to do TWO changes to each instance....<br><div class="codebox"><p>Code: </p><pre><code>[catch {exec -- fetch -q -A -m -T 1 -o - "http://$CastLogin:$CastPass@$CastIP:$CastPort/admin/icestatus.xml" 2&gt;/dev/null};]</code></pre></div>although nml said to add "2&gt;/dev/null" at the end of each instance, I had some where "&gt;&amp; /dev/null" was instead.. I now changed ALL instances to show the exact same thing as what nml stated..<br><br>I also had to add "--" after the "exec" directive AND a ; after the catch braces..  now it appears to be working... <br><br>more tests will follow...<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10318">dj-zath</a> — Sat Sep 11, 2010 4:07 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[dj-zath]]></name></author>
		<updated>2010-09-11T15:10:21-04:00</updated>

		<published>2010-09-11T15:10:21-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=94343#p94343</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=94343#p94343"/>
		<title type="html"><![CDATA[[SOLVED] exec command stopped working after upgrade]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=94343#p94343"><![CDATA[
right... then it doesn't work at all-  reports "can't create error...." etc etc etc<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10318">dj-zath</a> — Sat Sep 11, 2010 3:10 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2010-09-11T14:51:44-04:00</updated>

		<published>2010-09-11T14:51:44-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=94342#p94342</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=94342#p94342"/>
		<title type="html"><![CDATA[[SOLVED] exec command stopped working after upgrade]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=94342#p94342"><![CDATA[
Don't use &amp;...<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Sat Sep 11, 2010 2:51 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[dj-zath]]></name></author>
		<updated>2010-09-11T14:42:35-04:00</updated>

		<published>2010-09-11T14:42:35-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=94341#p94341</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=94341#p94341"/>
		<title type="html"><![CDATA[[SOLVED] exec command stopped working after upgrade]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=94341#p94341"><![CDATA[
this is the command I used....<br><div class="codebox"><p>Code: </p><pre><code>exec -- fetch -q -A -m -T 1 -o - "http://$CastLogin:$CastPass@$CastIP:$CastPort/admin/icestatus.xml" 2&gt;/dev/null &amp;];</code></pre></div>The problem is the Stdout is being read BEFORE the port can respond.. thus it returns a BLANK STRING<br><br>its important that the command waits for the port to read and then close.<br>(blocking?)<br><br>if/when the socket is fast, it works.. but this isn't constsant, I'm afraid..  running this in async isn't reliable.<br><br>-DjZ-<br>:/ :/<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10318">dj-zath</a> — Sat Sep 11, 2010 2:42 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2010-09-11T13:20:33-04:00</updated>

		<published>2010-09-11T13:20:33-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=94336#p94336</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=94336#p94336"/>
		<title type="html"><![CDATA[[SOLVED] exec command stopped working after upgrade]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=94336#p94336"><![CDATA[
First off, the redirect has to be "2&gt;" not "&gt;". Secondly, it has to be the last option on the command line.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Sat Sep 11, 2010 1:20 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[dj-zath]]></name></author>
		<updated>2010-09-11T12:40:26-04:00</updated>

		<published>2010-09-11T12:40:26-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=94333#p94333</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=94333#p94333"/>
		<title type="html"><![CDATA[[SOLVED] exec command stopped working after upgrade]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=94333#p94333"><![CDATA[
hi there my ole friend, mr. nml!<br><br>yeah, I see things a LOT differently, now, after getting some much-needed sleep.. than before..  I didn't  read the error output correctly initially...  <br><br>I'm currently working on:<br><br>exec -- &gt;/dev/null ./Bot.fch -q -A -m -T 1 -o - "<a href="http://macomb.com/index.html" class="postlink">http://macomb.com/index.html</a>"<br><br>in the test script to see if I can get it working..  thanks for your reply in any event, I am on the idea you have stated nonetheless..  I appreciate your reply! <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=10318">dj-zath</a> — Sat Sep 11, 2010 12:40 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2010-09-11T12:25:21-04:00</updated>

		<published>2010-09-11T12:25:21-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=94332#p94332</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=94332#p94332"/>
		<title type="html"><![CDATA[[SOLVED] exec command stopped working after upgrade]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=94332#p94332"><![CDATA[
Had you actually said that the error message was "unable to create error file..." rather than "command not found", I could've easily pointed you to a post of mine some time ago regarding the issue.<br><br>Nevertheless; yes, you can bypass this by running the child process in bg - which eliminates the need for an "error file". However, as you noticed, you then loose any generated output. The solution instead, is to redirect stderr somewhere else, yet leaving stdout untouched.. This way, we still get the stdout output without the need for an error file.<br><div class="codebox"><p>Code: </p><pre><code>exec ./text.cmd 2&gt; /dev/null</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Sat Sep 11, 2010 12:25 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[dj-zath]]></name></author>
		<updated>2010-09-11T12:05:47-04:00</updated>

		<published>2010-09-11T12:05:47-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=94330#p94330</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=94330#p94330"/>
		<title type="html"><![CDATA[[SOLVED] exec command stopped working after upgrade]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=94330#p94330"><![CDATA[
Okay!<br><br>after about 13 hours of sleep, I looked more closely at the problem...<br><br><br>Tcl error in file 'Bot.cfg':<br>couldn't create error file for command exec: no such file or directory<br>    while executing<br>"exec ./test.cmd"<br>    (file "./test.tcl" line 3)<br>    invoked from within<br>"source "./test.tcl""<br>    invoked from within<br>"if {([file exists "./test.tcl"])} {<br>        source "./test.tcl";<br>}"<br><br><br>The problem is that I have the "exec" command mis-formatted somehow throughout my code (and even in this test script!) which, is a "realitive" example of how "exec" was used throughout my code..<br><br>example:<br><div class="codebox"><p>Code: </p><pre><code>## Get Stream Data ##if {([catch {set CastInfo [exec fetch -q -A -m -T 1 -o - "http://$CastLogin:$CastPass@$CastIP:$CastPort/admin/icestatus.xml"];}])} {    incr CastErr;    if {($CastErr == "4")} {        set DetMC "offair.gif";        set CastInfo "";    } elseif {($CastErr &gt; "4")} {        set CastErr "5";    };} else {    set CastErr "0";    set DetMC "onair.gif";    set VarA [string first "\&lt;icestatus\&gt;" $CastInfo];    set VarA [string range $CastInfo $VarA [string length $CastInfo]];    set VarB [string first "\&lt;\/icestatus\&gt;" $VarA];    set VarB [expr $VarB - "1"];    set CastInfo [string range $VarA "11" $VarB];};</code></pre></div>"exec" in ths example runs "fetch" which is used to deal with authentication and socket housekeeping instead of having TCL do it (and thus slowing things way down). although this piece of code ran <em class="text-italics">flawlessly</em> in version 1.6.18 under TCL 8.4, it <strong class="text-strong">NO LONGER WORKS</strong> in version 1.6.20!<br><br>I was able to get an "exec" command to work in the test script by adding a &amp;, but I can no-longer import stdout (from the fetch) into the code- and thus, is what causing the "exec failure"  I am going back and re-reading the TCL man pages a little more closely to see if somehow, I was "broken" before, and now its "fixed" and no-longer working.. I now suspect its more of a "formatting/sintax" error than anything else.. and thus, IS fixable- beit  it will take some work..<br><br>For this post, I changed the mode to "solved" since I was able to get the exec command to function- even though its not functioning as I need it to..  I will continue to work on this and find out what the &lt;BEEEEP&gt; I was doing wrong in the first place.<br><br>-DjZ-<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10318">dj-zath</a> — Sat Sep 11, 2010 12:05 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[dj-zath]]></name></author>
		<updated>2010-09-11T17:38:09-04:00</updated>

		<published>2010-09-10T16:58:29-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=94318#p94318</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=94318#p94318"/>
		<title type="html"><![CDATA[[SOLVED] exec command stopped working after upgrade]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=94318#p94318"><![CDATA[
hi everyone!<br><br>I got one for ya.. probably a newbie question, however, at this point I'm too tired and fustrated to deal with it..<br><br>Recently, my server CRASHED..  (why this happened is a point for a different discussion)  so I had to have it shipped from the Co-Lo and then rebuild it.. from scratch!<br><br>except, this time around I wanted to upgrade all the goodies.. including eggdrop..<br><br>PROBLEM!<br><br>although the eggie installed, I quickly found that the "exec" command is no-longer being recongnized.. I even tried re-installing TCL and reverting back to an older version of TCL and then, the previous un-recompiled version of the eggie I ran  (v1.6.18) and still.. no luck!<br><br>after isolating the problem, and then making a quick "test script" for exec,  the eggie simply reports "TCL error- command "exec" not found" and dumps..  (in a "catch" it doesn't do anything except return  "error=1")<br><br>(re)installing TCL 8.4 and then TCL8.5  didn't fix the problem...<br><br>I'm sure its something simple I'm overlooking- but, at this point I'm just too flustered to think straight! (been under too much stress just getting this thing back online!)<br><br>-DjZ-<br>:/ :/<br><br>EDIT!<br>when I mentioned above "previous version", I meant to say "previous version of TCL, AND the old non-recompiled version of the eggie"  sorry for the confusion  (thats what I get for posting before getting sleep)<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10318">dj-zath</a> — Fri Sep 10, 2010 4:58 pm</p><hr />
]]></content>
	</entry>
	</feed>
