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

	<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-03-25T05:25:19-04:00</updated>

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

		<entry>
		<author><name><![CDATA[MasterJM]]></name></author>
		<updated>2003-03-25T05:25:19-04:00</updated>

		<published>2003-03-25T05:25:19-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=18216#p18216</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=18216#p18216"/>
		<title type="html"><![CDATA[time out exec ? problem]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=18216#p18216"><![CDATA[
<blockquote class="uncited"><div>The only other way, is to launch PSIG into the background, and ignore if it completed or not.<br><br>Alternativly, using some more advanced function you could do the following.<br><br>Create a small Tcl script that does the following,<br><br>1: Runs PSIG<br>2: Manages and saves the status to a file.<br><br>Eggdrop will lauch this script to the background.<br><br>It will then periodicaly check for the file with the status info, read it aloud to the channel, and then delete the file.</div></blockquote>oh, this is beyond my tcl knowledge.<br><br>so i start it per cronjob *g<br><br>thx anyway <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=1065">MasterJM</a> — Tue Mar 25, 2003 5:25 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ppslim]]></name></author>
		<updated>2003-03-24T15:32:24-04:00</updated>

		<published>2003-03-24T15:32:24-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=18201#p18201</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=18201#p18201"/>
		<title type="html"><![CDATA[time out exec ? problem]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=18201#p18201"><![CDATA[
The only other way, is to launch PSIG into the background, and ignore if it completed or not.<br><br>Alternativly, using some more advanced function you could do the following.<br><br>Create a small Tcl script that does the following,<br><br>1: Runs PSIG<br>2: Manages and saves the status to a file.<br><br>Eggdrop will lauch this script to the background.<br><br>It will then periodicaly check for the file with the status info, read it aloud to the channel, and then delete the file.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2">ppslim</a> — Mon Mar 24, 2003 3:32 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[MasterJM]]></name></author>
		<updated>2003-03-24T12:53:39-04:00</updated>

		<published>2003-03-24T12:53:39-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=18188#p18188</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=18188#p18188"/>
		<title type="html"><![CDATA[time out exec ? problem]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=18188#p18188"><![CDATA[
yeah must be right<br><br>this methode wirks fine with 3 other channels<br><br><br>same script - but only other bash scripts<br><img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_sad.gif" width="15" height="15" alt=":(" title="Sad"><br><br><br>is there an other way to make the eggdrop run pisg<br>with a --option ?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=1065">MasterJM</a> — Mon Mar 24, 2003 12:53 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ppslim]]></name></author>
		<updated>2003-03-24T12:42:08-04:00</updated>

		<published>2003-03-24T12:42:08-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=18186#p18186</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=18186#p18186"/>
		<title type="html"><![CDATA[time out exec ? problem]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=18186#p18186"><![CDATA[
I know it's unlikely, are you sure the path to psig is right in the "open" command.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2">ppslim</a> — Mon Mar 24, 2003 12:42 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[MasterJM]]></name></author>
		<updated>2003-03-24T12:30:33-04:00</updated>

		<published>2003-03-24T12:30:33-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=18184#p18184</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=18184#p18184"/>
		<title type="html"><![CDATA[time out exec ? problem]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=18184#p18184"><![CDATA[
<blockquote class="uncited"><div>You need to set execute permissions of the script<br><br>chmod u+x file.name</div></blockquote>done<br><br>but same error<br><img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_sad.gif" width="15" height="15" alt=":(" title="Sad"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=1065">MasterJM</a> — Mon Mar 24, 2003 12:30 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ppslim]]></name></author>
		<updated>2003-03-15T20:29:33-04:00</updated>

		<published>2003-03-15T20:29:33-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=17886#p17886</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=17886#p17886"/>
		<title type="html"><![CDATA[time out exec ? problem]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=17886#p17886"><![CDATA[
You need to set execute permissions of the script<br><br>chmod u+x file.name<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2">ppslim</a> — Sat Mar 15, 2003 8:29 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[MasterJM]]></name></author>
		<updated>2003-03-14T16:54:18-04:00</updated>

		<published>2003-03-14T16:54:18-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=17855#p17855</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=17855#p17855"/>
		<title type="html"><![CDATA[time out exec ? problem]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=17855#p17855"><![CDATA[
[21:49:51] &lt;MasterJM&gt; !stats<br>[21:50:15] &lt;eggdrop&gt; /home/masterjm/pisg/diablo could not be executed (Pisg v0.47 - perl irc statistics generator<br><br>have changed the bash script<br><div class="codebox"><p>Code: </p><pre><code> /home/masterjm/pisg&gt; cat diablo#!/usr/bin/tclshset fp [open "|/home/masterjm/pisg/pisg --configfile=/home/masterjm/pisg/d2de.cfg" r]while {![eof $fp]} {puts stdout [gets $fp]}close $fp</code></pre></div>the pfad seems also to be right<br><br> /home/masterjm/pisg&gt; which tclsh<br>/usr/bin/tclsh<br><br><br>whats wrong ?<br><img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_sad.gif" width="15" height="15" alt=":(" title="Sad"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=1065">MasterJM</a> — Fri Mar 14, 2003 4:54 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2003-03-14T16:06:15-04:00</updated>

		<published>2003-03-14T16:06:15-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=17854#p17854</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=17854#p17854"/>
		<title type="html"><![CDATA[time out exec ? problem]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=17854#p17854"><![CDATA[
Seems we have a lil problem here. The forum forgot to place the *code* <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=187">caesar</a> — Fri Mar 14, 2003 4:06 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ppslim]]></name></author>
		<updated>2003-03-14T13:17:14-04:00</updated>

		<published>2003-03-14T13:17:14-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=17853#p17853</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=17853#p17853"/>
		<title type="html"><![CDATA[time out exec ? problem]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=17853#p17853"><![CDATA[
I just noticed your problem.<br><br>It's related to the way the Tcl exec command handles input from aplications.<br><br>There are two default channels available for applications to write too. From the console, both are diaplayed to the user.<br><br>However, each can be handled seperatly.<br><br>One is called STDOUT, the other STDERR.<br><br>When the exec command gets input on STDERR, it automaticaly, throws a Tcl error.<br><br>This can and does break Tcl scripts, though using catch will prevent the current event loop ending.<br><br>This is what is happening here.<br><br>Application do not have to send output to STDERR if it's an error, most use it as a information channel, so that STDOUT can be captured to a file, and the STDERR data is still displayed to a user.<br><br>This is likely what pisg is doing, sending output to stdout.<br><br>The quickest way to fix it, is to use this in place of your bash script.<br><div class="codebox"><p>Code: </p><pre><code>#!/usr/bin/tclshset fp [open "|/home/masterjm/pisg/pisg --configfile=/home/masterjm/pisg/chan.cfg" r]while {![eof $fp]} {  puts stdout [gets $fp]}close $fp[code]There is no error handling, but it will save any changes to your eggdrop.</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2">ppslim</a> — Fri Mar 14, 2003 1:17 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[MasterJM]]></name></author>
		<updated>2003-03-14T11:22:02-04:00</updated>

		<published>2003-03-14T11:22:02-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=17850#p17850</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=17850#p17850"/>
		<title type="html"><![CDATA[time out exec ? problem]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=17850#p17850"><![CDATA[
okay okay<br><br>i explain it <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><br><br>i have done a little tcl script to run "pisg" (the channel stats with perl)<br>per trigger from pub<br><br><br>the tcl starts a little bash script like:<br><br>#!/bin/bash<br>/home/masterjm/pisg/pisg --configfile=/home/masterjm/pisg/chan.cfg<br><br>(works for 3 litte chans)<br><br>but if this is a greater chan (great and long log files) the eggdrops says:<br><br>&lt;eggdrop&gt; /home/masterjm/pisg/diablo could not be executed (Could not load pisg! reason:<br><br>but in bash (ssh) the script "sh diablo" or "./diablo" works<br><br>its not a tcl script or bash script or chmod thing<br>its something like time out for the exec command in the tcl script t thought?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=1065">MasterJM</a> — Fri Mar 14, 2003 11:22 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ppslim]]></name></author>
		<updated>2003-03-14T05:10:14-04:00</updated>

		<published>2003-03-14T05:10:14-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=17848#p17848</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=17848#p17848"/>
		<title type="html"><![CDATA[time out exec ? problem]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=17848#p17848"><![CDATA[
It all depends what error you get.<br><br>First off, I can understand wanting to protect what you are doing, but that usualy means we are too out of the picture.<br><br>First off.<br><br>What error do you get?<br><br>Where is the error generated? By Tcl, or the program your are calling?<br><br>Depending on the error, it may well be the program you are calling that is at issue.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2">ppslim</a> — Fri Mar 14, 2003 5:10 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[MasterJM]]></name></author>
		<updated>2003-03-13T21:51:08-04:00</updated>

		<published>2003-03-13T21:51:08-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=17842#p17842</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=17842#p17842"/>
		<title type="html"><![CDATA[time out exec ? problem]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=17842#p17842"><![CDATA[
proc pub:xy {nick uhost hand chan text} {<br> global update_setting<br> puthelp "PRIVMSG $chan :[expr {[catch {exec $xy_setting(exec1)} error]?"$xy_setting(exec1) could not be executed ([string totitle $error]).":$xy_setting(msg1)}]"<br>}<br><br>works fine<br><br>but if the bot starts a script that runs longer than ~20 sec <br>it appears an error - and the script dont finish work<br><br>scripts that dont take so much time works fine<br><br>is there a time out var or so<br><br>(the bot starts a bash script that take 20~30 sec to complete)<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=1065">MasterJM</a> — Thu Mar 13, 2003 9:51 pm</p><hr />
]]></content>
	</entry>
	</feed>
