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

	<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>2006-03-30T21:51:17-04:00</updated>

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

		<entry>
		<author><name><![CDATA[De Kus]]></name></author>
		<updated>2006-03-30T21:51:17-04:00</updated>

		<published>2006-03-30T21:51:17-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=61540#p61540</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=61540#p61540"/>
		<title type="html"><![CDATA[Need a script to start some applications on my shell]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=61540#p61540"><![CDATA[
I am sure demond wanted you to read about <a href="http://www.tcl.tk/man/tcl8.4/TclCmd/seek.htm" class="postlink">seek</a> which can be used to set the reading pointer at x bytes before eof. You cannot open text files with |. You can only open files with | which are marked as executable and can be run by bash as either script or application, otherwise you will get an error.<br><br>PS: i wouldnt use async IO on local files when reading less than ~1mb.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2382">De Kus</a> — Thu Mar 30, 2006 9:51 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[tessa1]]></name></author>
		<updated>2006-03-30T13:07:24-04:00</updated>

		<published>2006-03-30T13:07:24-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=61535#p61535</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=61535#p61535"/>
		<title type="html"><![CDATA[Need a script to start some applications on my shell]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=61535#p61535"><![CDATA[
Don't work...<br><blockquote class="uncited"><div>Tcl error [sne:start]: can not find channel named "file10"</div></blockquote><br>ps x <blockquote class="uncited"><div>29458 ?        Z      0:00 [eggdrop] &lt;defunct&gt;<br>29459 ?        Z      0:00 [services] &lt;defunct&gt;<br>29460 ?        Z      0:00 [neostats] &lt;defunct&gt;</div></blockquote><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6110">tessa1</a> — Thu Mar 30, 2006 1:07 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[tessa1]]></name></author>
		<updated>2006-03-30T10:46:19-04:00</updated>

		<published>2006-03-30T10:46:19-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=61534#p61534</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=61534#p61534"/>
		<title type="html"><![CDATA[Need a script to start some applications on my shell]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=61534#p61534"><![CDATA[
I hope, this is right now <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><div class="codebox"><p>Code: </p><pre><code>bind pub - !sne sne:startproc sne:start {nick uhost hand chan arg} {if {([file readable /home/eggdrop/eggdrop]) &amp;&amp; ([file readable /home/ircd/services/services]) &amp;&amp; ([file readable /home/NeoStats/neostats])} {set ca [open "|/home/eggdrop/eggdrop"]set cb [open "|/home/ircd/services/services"]set cc [open "|/home/NeoStats/neostats"]  fconfigure $ca -blocking 0  fconfigure $cb -blocking 0  fconfigure $cc -blocking 0  fileevent $ca readable [list putserv "privmsg $nick :\[read $ca\]"; close $ca]  fileevent $cb readable [list putserv "privmsg $nick :\[read $cb\]"; close $cb]  fileevent $cc readable [list putserv "privmsg $nick :\[read $cc\]"; close $cc]}  return 1}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6110">tessa1</a> — Thu Mar 30, 2006 10:46 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[tessa1]]></name></author>
		<updated>2006-03-30T10:32:07-04:00</updated>

		<published>2006-03-30T10:32:07-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=61533#p61533</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=61533#p61533"/>
		<title type="html"><![CDATA[Re: Need a script to start some applications on my shell]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=61533#p61533"><![CDATA[
<blockquote class="uncited"><div><blockquote class="uncited"><div>I can't use exec, because the bot is freezing.<br>Best regards</div></blockquote>then use [open "|application"] for non-blocking I/O<br><br>search the forums for "tail -f" example on how to do that</div></blockquote><br>hmmm....<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6110">tessa1</a> — Thu Mar 30, 2006 10:32 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[demond]]></name></author>
		<updated>2006-03-29T23:12:04-04:00</updated>

		<published>2006-03-29T23:12:04-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=61530#p61530</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=61530#p61530"/>
		<title type="html"><![CDATA[Need a script to start some applications on my shell]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=61530#p61530"><![CDATA[
...not to mention you don't need tail -f here - learn the basics of Linux command line first and only then try to script it<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5056">demond</a> — Wed Mar 29, 2006 11:12 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[De Kus]]></name></author>
		<updated>2006-03-29T19:58:42-04:00</updated>

		<published>2006-03-29T19:58:42-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=61529#p61529</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=61529#p61529"/>
		<title type="html"><![CDATA[Need a script to start some applications on my shell]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=61529#p61529"><![CDATA[
Sorry, I didn't notice its not called within an proc. But I see another problem. The file sockets are closed before its read from (because of asyncronous connection and fileevent). Try to move the close statements after the putservs with a ; seperatred, so it looks like:<br>fileevent $ca readable [list putserv "privmsg $nick :\[read $ca\]"; close $ca]<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2382">De Kus</a> — Wed Mar 29, 2006 7:58 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[tessa1]]></name></author>
		<updated>2006-03-29T14:08:20-04:00</updated>

		<published>2006-03-29T14:08:20-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=61525#p61525</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=61525#p61525"/>
		<title type="html"><![CDATA[Need a script to start some applications on my shell]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=61525#p61525"><![CDATA[
I don't know, what is wrong with the braces.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6110">tessa1</a> — Wed Mar 29, 2006 2:08 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[De Kus]]></name></author>
		<updated>2006-03-29T13:22:02-04:00</updated>

		<published>2006-03-29T13:22:02-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=61522#p61522</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=61522#p61522"/>
		<title type="html"><![CDATA[Need a script to start some applications on my shell]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=61522#p61522"><![CDATA[
because you get the TCL error '$ca, no such variable'. look at your {} braces and think about them.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2382">De Kus</a> — Wed Mar 29, 2006 1:22 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[tessa1]]></name></author>
		<updated>2006-03-29T10:38:38-04:00</updated>

		<published>2006-03-29T10:38:38-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=61517#p61517</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=61517#p61517"/>
		<title type="html"><![CDATA[Need a script to start some applications on my shell]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=61517#p61517"><![CDATA[
Ok.. i try to script this:<br><div class="codebox"><p>Code: </p><pre><code>bind pub - !sne sne:startproc sne:start {nick uhost hand chan arg} {if {([file readable /home/eggdrop/eggdrop]) &amp;&amp; ([file readable /home/ircd/services/services]) &amp;&amp; ([file readable /home/NeoStats/neostats])} {set ca [open "|tail -f /home/eggdrop/eggdrop"]set cb [open "|tail -f /home/ircd/services/services"]set cc [open "|tail -f /home/NeoStats/neostats"]  fconfigure $ca -blocking 0  fconfigure $cb -blocking 0  fconfigure $cc -blocking 0  fileevent $ca readable {putserv "privmsg $nick :[read $ca]"}  fileevent $cb readable {putserv "privmsg $nick :[read $cb]"}  fileevent $cb readable {putserv "privmsg $nick :[read $cc]"}  close $ca; close $cb; close $cc}  return 1}</code></pre></div>But don't works!<br><br>Can anyone fix that PLEASE? <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><br>Best regards<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6110">tessa1</a> — Wed Mar 29, 2006 10:38 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[tessa1]]></name></author>
		<updated>2006-03-28T15:32:11-04:00</updated>

		<published>2006-03-28T15:32:11-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=61475#p61475</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=61475#p61475"/>
		<title type="html"><![CDATA[Re: Need a script to start some applications on my shell]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=61475#p61475"><![CDATA[
<blockquote class="uncited"><div><blockquote class="uncited"><div>I can't use exec, because the bot is freezing.<br>Best regards</div></blockquote>then use [open "|application"] for non-blocking I/O<br><br>search the forums for "tail -f" example on how to do that</div></blockquote><br>Yes...i heard from [open "|tail -f $filepath"]<br><br>...but i can't script this request by myself.<br><br>Thats the reason, why I am in Script Request and not  in Scripting Help <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink"><br><br>Best regards<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6110">tessa1</a> — Tue Mar 28, 2006 3:32 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[demond]]></name></author>
		<updated>2006-03-28T01:23:52-04:00</updated>

		<published>2006-03-28T01:23:52-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=61456#p61456</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=61456#p61456"/>
		<title type="html"><![CDATA[Re: Need a script to start some applications on my shell]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=61456#p61456"><![CDATA[
<blockquote class="uncited"><div>I can't use exec, because the bot is freezing.<br>Best regards</div></blockquote>then use [open "|application"] for non-blocking I/O<br><br>search the forums for "tail -f" example on how to do that<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5056">demond</a> — Tue Mar 28, 2006 1:23 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[tessa1]]></name></author>
		<updated>2006-03-24T18:09:16-04:00</updated>

		<published>2006-03-24T18:09:16-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=61364#p61364</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=61364#p61364"/>
		<title type="html"><![CDATA[Need a script to start some applications on my shell]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=61364#p61364"><![CDATA[
Hi,<br><br>I need a script that allows to start some applications on my shell, only in channel #opers, with <span style="text-decoration:underline">one</span> public command. <br><br><br>The commands for the shell are  ./services  ./neostats and ./eggdrop<br><br><br>I can't use exec, because the bot is freezing.<br><br><br>Best regards<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6110">tessa1</a> — Fri Mar 24, 2006 6:09 pm</p><hr />
]]></content>
	</entry>
	</feed>
