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

	<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>2001-12-07T20:44:00-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2001-12-07T20:44:00-04:00</updated>

		<published>2001-12-07T20:44:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=2524#p2524</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=2524#p2524"/>
		<title type="html"><![CDATA[Two TCL Problems]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=2524#p2524"><![CDATA[
Is there any other way to get around that 1 second thing with out modifing the source, and/or exec an outside program?<br>I don't really need it in the after command but I must have it for my fileevent. I saw in the manual Tcl_DoOneEvent(TCL_FILE_EVENTS) but I don't know how to invoke it (if it even does what I want it to do)<p>Statistics: Posted by Guest — Fri Dec 07, 2001 8:44 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[stdragon]]></name></author>
		<updated>2001-12-04T00:54:00-04:00</updated>

		<published>2001-12-04T00:54:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=2413#p2413</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=2413#p2413"/>
		<title type="html"><![CDATA[Two TCL Problems]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=2413#p2413"><![CDATA[
Ppslim is right about using <ul><li>, you should listen to his advice vxspiritxv.<br><br>As to your second problem, you are right, eggdrop will only run it about once a second, because that is how eggdrop's event loop works. That also means that you can't use the 'after' command with a granularity of less than a second.<br><br>There are ways to get around this, such as by editing src/net.c and reducing the timeout from 1 second to, say, 1/10 second.</li></ul><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8">stdragon</a> — Tue Dec 04, 2001 12:54 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ppslim]]></name></author>
		<updated>2001-12-03T19:16:00-04:00</updated>

		<published>2001-12-03T19:16:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=2401#p2401</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=2401#p2401"/>
		<title type="html"><![CDATA[Two TCL Problems]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=2401#p2401"><![CDATA[
using<blockquote class="uncited"><div>after 8000 {putlog "hello"}</div></blockquote>Is not advisable<br><br>It's far simpler to use the "list" command.<br><br>An example of where the {} method would fail, is when you want to pass a variable to the command, once the timer has triggered.<br><br>EG<br>in a eggdrop script<div class="codebox"><p>Code: </p><pre><code>proc onjoin {nick uh hand chan} {  after 3000 {putlog "$nick join channel 3 seconds ago"}}</code></pre></div>This would work fine, except, if I where to join a channel (with the nickname ppslim) the log file would now have a line looking like<blockquote class="uncited"><div>[00:00] $nick join channel 3 seconds ago</div></blockquote>instead of desired<blockquote class="uncited"><div>[oo:oo] ppslim join channel 3 seconds ago</div></blockquote>This is all to do with the way Tcl handles lists.<br><br>If you where to let Tcl create the list for you (witht he list command), it would all be fine.<div class="codebox"><p>Code: </p><pre><code>proc onjoin {nick uh hand chan} {  after 3000 [list putlog "$nick join channel 3 seconds ago"]}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2">ppslim</a> — Mon Dec 03, 2001 7:16 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2001-12-03T18:40:00-04:00</updated>

		<published>2001-12-03T18:40:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=2399#p2399</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=2399#p2399"/>
		<title type="html"><![CDATA[Two TCL Problems]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=2399#p2399"><![CDATA[
ok thanks my mistake on that, but I have a better way than using list (which works)<br>.tcl after 4000 {putlog hi}<br>now just need to figure out writable. I can prob get around the problem just calling it myself and check fblocked, well ok thanks for your help.<p>Statistics: Posted by Guest — Mon Dec 03, 2001 6:40 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ppslim]]></name></author>
		<updated>2001-12-03T18:20:00-04:00</updated>

		<published>2001-12-03T18:20:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=2398#p2398</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=2398#p2398"/>
		<title type="html"><![CDATA[Two TCL Problems]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=2398#p2398"><![CDATA[
using<blockquote class="uncited"><div>.tcl utimer 3 [putlog hi]</div></blockquote>would return instantly<br><br>using the [ ] makes it execute there and then. You are meant to be sending it a list of commands and arguments. In your situation, you are telling the utimer to execute what the command "putlog" returns after 3 seconds.<br><br>In this situation (and with the Tcl "after" command), you should use<blockquote class="uncited"><div>utimer 3 [list putlog "hi people"]<br>after 8000 [list putlog "hi people"]</div></blockquote><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2">ppslim</a> — Mon Dec 03, 2001 6:20 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2001-12-03T17:49:00-04:00</updated>

		<published>2001-12-03T17:49:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=2395#p2395</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=2395#p2395"/>
		<title type="html"><![CDATA[Two TCL Problems]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=2395#p2395"><![CDATA[
ms is milliseconds, any number there doesn't make any difference when its used only in eggdrop, and as for why I need these 2 commands, its for file sending over socket. I've used all these commands in a raw shell script with no problems, so I can only conclude eggdrop is the problem. Ohh and you suggested utimer, both .tcl utimer 3 [putlog hi] and .tcl utimer 8000 [putlog hi] return hi instantly. Yes I know about the dump dcc commands and such, but I have special reasons for making what I am.<p>Statistics: Posted by Guest — Mon Dec 03, 2001 5:49 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ppslim]]></name></author>
		<updated>2001-12-03T16:34:00-04:00</updated>

		<published>2001-12-03T16:34:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=2390#p2390</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=2390#p2390"/>
		<title type="html"><![CDATA[Two TCL Problems]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=2390#p2390"><![CDATA[
These are both Tcl issues, as eggdrop does not affect there usage in any way.<br><br>Once every event loop inside eggdrop, Tcl_DoOneEvent is called. Tcl then checks to make sure that it is upto date with it's "after" and "fileevent" commands.<br><br>Eggdrop does not have access to the information provided to Tcl in the "fileevent" or "after" commands, as it is Tcl's responcibility.<br><br>What are you specifying as "ms" in the after command, and why do you actualy need to work with then units of time? It is far more simpler to use eggdrops "utimer" to call after 1 second.<br><br>Did you ever consider that the fileevent is calling the proc, because the channel is writable, and not because there is a glitch.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2">ppslim</a> — Mon Dec 03, 2001 4:34 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2001-12-03T04:28:00-04:00</updated>

		<published>2001-12-03T04:28:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=2366#p2366</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=2366#p2366"/>
		<title type="html"><![CDATA[Two TCL Problems]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=2366#p2366"><![CDATA[
First one:<br> 'after ms proc' command seems to run inside command instantly and not wait ms.<br><a href="http://www.scriptics.com/man/tcl8.4/TclCmd/after.htm" class="postlink">http://www.scriptics.com/man/tcl8.4/TclCmd/after.htm</a><br><br>Second one:<br> 'fileevent channel writable proc'<br>seems to run every second instead of intended as soon as channel is writable.<p>Statistics: Posted by Guest — Mon Dec 03, 2001 4:28 am</p><hr />
]]></content>
	</entry>
	</feed>
