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

	<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-08-26T18:11:56-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Ofloo]]></name></author>
		<updated>2003-08-26T18:11:56-04:00</updated>

		<published>2003-08-26T18:11:56-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=25708#p25708</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=25708#p25708"/>
		<title type="html"><![CDATA[fileevent ??]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=25708#p25708"><![CDATA[
ah ok tnx<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3151">Ofloo</a> — Tue Aug 26, 2003 6:11 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[stdragon]]></name></author>
		<updated>2003-08-24T15:41:46-04:00</updated>

		<published>2003-08-24T15:41:46-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=25602#p25602</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=25602#p25602"/>
		<title type="html"><![CDATA[fileevent ??]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=25602#p25602"><![CDATA[
That's where you put your own code.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8">stdragon</a> — Sun Aug 24, 2003 3:41 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Ofloo]]></name></author>
		<updated>2003-08-24T12:03:07-04:00</updated>

		<published>2003-08-24T12:03:07-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=25585#p25585</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=25585#p25585"/>
		<title type="html"><![CDATA[fileevent ??]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=25585#p25585"><![CDATA[
<blockquote class="uncited"><div># got a line, do whatever you want with it </div></blockquote><blockquote class="uncited"><div># program terminated</div></blockquote>what you exactly mean by this ? just curious <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink"> i mean is there where i put the info or is it just some info you added to make the code understandable .. ?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3151">Ofloo</a> — Sun Aug 24, 2003 12:03 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Ofloo]]></name></author>
		<updated>2003-08-24T11:59:43-04:00</updated>

		<published>2003-08-24T11:59:43-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=25584#p25584</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=25584#p25584"/>
		<title type="html"><![CDATA[fileevent ??]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=25584#p25584"><![CDATA[
tnx for the scripts and i will test em sorry for the answer delay .. :/ was not home hehe for few days hehe so but ill test em for sur <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink"> tnx in advance this surtanly will give me new ideas <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3151">Ofloo</a> — Sun Aug 24, 2003 11:59 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[stdragon]]></name></author>
		<updated>2003-08-22T09:47:08-04:00</updated>

		<published>2003-08-22T09:47:08-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=25467#p25467</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=25467#p25467"/>
		<title type="html"><![CDATA[fileevent ??]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=25467#p25467"><![CDATA[
If you want to set up a fileevent, use readable as roland suggests. But I'd caution that the if data = "" thing isn't necessarily true. If you're using gets, for instance, it will return "" if there is an incomplete line, or simply a blank line. A less fallible way to check for the channel closing is just to use the [eof] command like ppslim does in his code. To combine the two, it's something like this:<br><div class="codebox"><p>Code: </p><pre><code>set fp [open |blah.exe r+]fconfigure $fp -blocking 0fileevent $fp readable [list on_readable $fp]proc on_readable {fp} {  set len [gets $fp line]  if {$len &gt; 0} {    # got a line, do whatever you want with it  } elseif {[eof $fp]} {    close $fp    # program terminated  }  return 0}</code></pre></div>Not tested, of course :)<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8">stdragon</a> — Fri Aug 22, 2003 9:47 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ppslim]]></name></author>
		<updated>2003-08-21T07:49:08-04:00</updated>

		<published>2003-08-21T07:49:08-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=25414#p25414</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=25414#p25414"/>
		<title type="html"><![CDATA[fileevent ??]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=25414#p25414"><![CDATA[
Use a utimer than cycles every few seconds.<br><br>It should check to see if the channel has gone "EOF" (using the "eof" command).<br><br>This will only trigger once the buffer is empty and you have tried to read the empty buffer.<br><br>If it is EOF, then you can call you own script, in other words, you are making your own small binding system.<br><div class="codebox"><p>Code: </p><pre><code>proc bind_eof {fp cmd} {  if {[catch [list eof $fp]]} { error "Channel $fp non existant" }  utimer 2 [list eof_check $fp $cmd]}proc eof_check {fp cmd} {  if {[eof $fp]} {    eval $cmd  } else {    if {[catch [list eof $fp]]} { error "Channel $fp no longer in existance" }    utimer 2 [list eof_check $fp $cmd]  }}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2">ppslim</a> — Thu Aug 21, 2003 7:49 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[rolandguy]]></name></author>
		<updated>2003-08-21T07:43:45-04:00</updated>

		<published>2003-08-21T07:43:45-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=25411#p25411</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=25411#p25411"/>
		<title type="html"><![CDATA[fileevent ??]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=25411#p25411"><![CDATA[
if file readable and the data is NULL (""), that's the end of the events for that channel and the handler is removed.  <br><br>basicly, if {$arg==""} {do_endscript}     <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink"><br><br>roland<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3658">rolandguy</a> — Thu Aug 21, 2003 7:43 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Ofloo]]></name></author>
		<updated>2003-08-20T20:47:20-04:00</updated>

		<published>2003-08-20T20:47:20-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=25391#p25391</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=25391#p25391"/>
		<title type="html"><![CDATA[fileevent ??]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=25391#p25391"><![CDATA[
hmm ive read about file event its a binding that starts when a specific channel gets readable or writeable .. , but what about when a channel closes , i got a script that open exe "r+" after a few minutes when it ends (channel closes) i would like to trigger a trigger to perfom a script .. how would i do this .. ?? ive been looking true the manual and euhm can't find sutch thing . ? any one who can help me out ?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3151">Ofloo</a> — Wed Aug 20, 2003 8:47 pm</p><hr />
]]></content>
	</entry>
	</feed>
