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

	<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>2012-05-07T13:19:11-04:00</updated>

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

		<entry>
		<author><name><![CDATA[willyw]]></name></author>
		<updated>2012-05-07T13:19:11-04:00</updated>

		<published>2012-05-07T13:19:11-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=99359#p99359</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=99359#p99359"/>
		<title type="html"><![CDATA[!stop command when bot it outputting text file.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=99359#p99359"><![CDATA[
tempest:<br><br>See nml375's post here:<br><br><a href="http://forum.egghelp.org/viewtopic.php?p=99358#99358" class="postlink">http://forum.egghelp.org/viewtopic.php?p=99358#99358</a><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10420">willyw</a> — Mon May 07, 2012 1:19 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[tempest]]></name></author>
		<updated>2012-04-28T08:22:38-04:00</updated>

		<published>2012-04-28T08:22:38-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=99281#p99281</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=99281#p99281"/>
		<title type="html"><![CDATA[!stop command when bot it outputting text file.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=99281#p99281"><![CDATA[
Sorry I have not been able to reply sooner. Life threw me a few curly ones this week, so have not had much of a chance to do more on this. But I'm back to it now!<br><br>Just wanted to say thank you for all the help that you guys have posted! it's been really great! I will let you all know how I go!<br><br>tempest.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11978">tempest</a> — Sat Apr 28, 2012 8:22 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[willyw]]></name></author>
		<updated>2012-04-25T10:37:37-04:00</updated>

		<published>2012-04-25T10:37:37-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=99262#p99262</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=99262#p99262"/>
		<title type="html"><![CDATA[!stop command when bot it outputting text file.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=99262#p99262"><![CDATA[
<blockquote class="uncited"><div>well read up on utimer. It's a little confusing, just adding the utime line with the output still lets the bot output but still no actual pause in time for each line. hmmmm <br></div></blockquote>I wasn't sure about it. <br>I suspect that all the timers are set and run down and the whole mess is in the queue, waiting,  same as before.<br><blockquote class="uncited"><div>I am now actually reading of a tcl manual LOL so i might get there in the end.</div></blockquote>Excellent!<br>I have no doubt that you will.   <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><br><blockquote class="uncited"><div>Still more pointers welcome! </div></blockquote>Do this little course:<br><a href="http://suninet.the-demon.de/" class="postlink">http://suninet.the-demon.de/</a><br>I think it is a good place to begin.  And you can use it for reference too, later.<br><br>Keep this open for reading, whenever scripting:<br><a href="http://www.tcl.tk/man/tcl8.5/TclCmd/contents.htm" class="postlink">http://www.tcl.tk/man/tcl8.5/TclCmd/contents.htm</a><br><br>Keep this open too, whenever scripting:<br><a href="http://www.eggheads.org/support/egghtml/1.6.20/tcl-commands.html" class="postlink">http://www.eggheads.org/support/egghtml ... mands.html</a><br><br>With those three, you can do a LOT.<br><br><blockquote class="uncited"><div>I have also read the utimer post that is here <br><br><a href="http://forum.egghelp.org/viewtopic.php?p=88230" class="postlink">http://forum.egghelp.org/viewtopic.php?p=88230</a><br><br>but still a little unclear how it fits in... having a bit of a play.. <br><br>apparently a lot of people have a similar issue with utimer? It's just not clear cut! LOL </div></blockquote>Not really.<br>In that thread, arfer and nml375 are commenting.  What they are talking about is the same thing that is covered by that link I gave you earlier:<br><a href="http://www.peterre.info/characters.html" class="postlink">http://www.peterre.info/characters.html</a><br>On that page, it tells how to use list with the timer (and utimer) command.<br>Perhaps their explanation was easier to follow.<br><br>Tip: In my experience reading here, anything to do with TCL that either arfer or nml375 responds with, is solid.<br>Actually, that's what we need here now... for one of them to jump in here.<br><blockquote class="uncited"><div>*gets her thinking cap on*</div></blockquote>Me too, and normally I would not have replied yet.  But a solution is not coming to me, ( I have tried something else, and got similar results again) and I don't want you to have to wait.   Others that may know how to do this in the proper manner, may be reading along and being polite and not jumping in.   I'm inviting them, now.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10420">willyw</a> — Wed Apr 25, 2012 10:37 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[tempest]]></name></author>
		<updated>2012-04-25T04:03:05-04:00</updated>

		<published>2012-04-25T04:03:05-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=99261#p99261</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=99261#p99261"/>
		<title type="html"><![CDATA[!stop command when bot it outputting text file.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=99261#p99261"><![CDATA[
well read up on utimer. It's a little confusing, just adding the utime line with the output still lets the bot output but still no actual pause in time for each line. hmmmm <br><br>I am now actually reading of a tcl manual LOL so i might get there in the end. Still more pointers welcome! <br><br>I have also read the utimer post that is here <br><br><a href="http://forum.egghelp.org/viewtopic.php?p=88230" class="postlink">http://forum.egghelp.org/viewtopic.php?p=88230</a><br><br>but still a little unclear how it fits in... having a bit of a play.. <br><br>apparently a lot of people have a similar issue with utimer? It's just not clear cut! LOL <br>*gets her thinking cap on*<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11978">tempest</a> — Wed Apr 25, 2012 4:03 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[willyw]]></name></author>
		<updated>2012-04-24T09:53:49-04:00</updated>

		<published>2012-04-24T09:53:49-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=99251#p99251</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=99251#p99251"/>
		<title type="html"><![CDATA[!stop command when bot it outputting text file.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=99251#p99251"><![CDATA[
<blockquote class="uncited"><div>...<br>so trying to get it to wait for 3 seconds as the normal cue is a bit fast for what im after i have found.. however it seems to pause the whole script rather than just the text output. I have done a little searching around and i have only found examples of this in non loops... this last part and it will be perfect! LOL</div></blockquote><br>Off the top of my head (meaning - -  untested) :<br><br>Experiment with this -<br><div class="codebox"><p>Code: </p><pre><code>utimer 3 [list puthelp "PRIVMSG $chan :$trance_line" ]</code></pre></div><br>Reference:<br><a href="http://www.eggheads.org/support/egghtml/1.6.21/tcl-commands.html" class="postlink">http://www.eggheads.org/support/egghtml ... mands.html</a><br>and<br><a href="http://www.peterre.info/characters.html" class="postlink">http://www.peterre.info/characters.html</a><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10420">willyw</a> — Tue Apr 24, 2012 9:53 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[tempest]]></name></author>
		<updated>2012-04-24T09:39:23-04:00</updated>

		<published>2012-04-24T09:39:23-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=99250#p99250</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=99250#p99250"/>
		<title type="html"><![CDATA[!stop command when bot it outputting text file.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=99250#p99250"><![CDATA[
yes well found that it cues up rather quickly! so the "clearqueue" is working wonders! don't want to pest too much just one more bit of advice. i want to slow down the output a little to the chan so in the loop i tried this... <br><div class="codebox"><p>Code: </p><pre><code>    foreach trance_line $data {       puthelp "PRIVMSG $chan :$trance_line"        update       after 3000    } </code></pre></div>so trying to get it to wait for 3 seconds as the normal cue is a bit fast for what im after i have found.. however it seems to pause the whole script rather than just the text output. I have done a little searching around and i have only found examples of this in non loops... this last part and it will be perfect! LOL<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11978">tempest</a> — Tue Apr 24, 2012 9:39 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[willyw]]></name></author>
		<updated>2012-04-24T08:58:41-04:00</updated>

		<published>2012-04-24T08:58:41-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=99249#p99249</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=99249#p99249"/>
		<title type="html"><![CDATA[!stop command when bot it outputting text file.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=99249#p99249"><![CDATA[
Something almost exactly like this was my first thought too.<br>When it didn't work, I did a quick experiment.<br><br>Try this:<br>Trigger the reader proc, then -<br>In the partyline, do: .tcl queuesize<br>to get the current number of entries in the queue.<br>Keep repeating the command, and see it count down.<br>(Be sure the file had something like 20 lines or more, so you have time)<br><br>I came to the conclusion that the foreach loop quickly does its job, and everything is in the queue, waiting.   Thus, when the user comes along with the break, it doesn't matter... the loop is long done.<br><br>If you have time, experiment with it, and see what you come up with.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10420">willyw</a> — Tue Apr 24, 2012 8:58 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[tempest]]></name></author>
		<updated>2012-04-24T02:22:34-04:00</updated>

		<published>2012-04-24T02:22:34-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=99248#p99248</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=99248#p99248"/>
		<title type="html"><![CDATA[!stop command when bot it outputting text file.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=99248#p99248"><![CDATA[
thank you so much caesar!<br><br>im not able to apply your suggestions just yet, as im out and about! but i will let you know how i go with it when i get back in! <br><br>You guys are so helpfull!! <br><br>thank you!<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11978">tempest</a> — Tue Apr 24, 2012 2:22 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2012-04-24T01:13:12-04:00</updated>

		<published>2012-04-24T01:13:12-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=99247#p99247</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=99247#p99247"/>
		<title type="html"><![CDATA[!stop command when bot it outputting text file.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=99247#p99247"><![CDATA[
First, it's better and wise to use <em class="text-italics">puthelp</em> instead of <em class="text-italics">putquick</em>.<div class="codebox"><p>Code: </p><pre><code>bind pub - "!hypno_stop" hypno_stopproc hypno_stop {nick uhost handle chan text} {global hypno_statusset hypno_status 0}</code></pre></div>add before "set tracks [open $filename]":<div class="codebox"><p>Code: </p><pre><code>global hypno_statusset hypno_status 1</code></pre></div>and then alter your loop like this:<div class="codebox"><p>Code: </p><pre><code>    foreach trance_line $data {        if {!$hypno_status} break        puthelp "PRIVMSG #TheGridTestingArea :$trance_line"    }</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Tue Apr 24, 2012 1:13 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[tempest]]></name></author>
		<updated>2012-04-23T18:01:58-04:00</updated>

		<published>2012-04-23T18:01:58-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=99245#p99245</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=99245#p99245"/>
		<title type="html"><![CDATA[!stop command when bot it outputting text file.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=99245#p99245"><![CDATA[
thank you for the quick reply!<br><br>Well i put the proc in and it still does the same.. if you run the stop command while the bot is outputting the text file to the chan, it will not pick up the fact that you have done it untill it finishes outputting the file. <br><br>One the files has finished being output it then runs the stop proc. hmmm im still trying.. <br><br>tempest.<br><br>Edit:<br>I'm sorry i must of put it in wrong. it n ow seems to be working! thank you so so much for your help!!!<br><br>You just made my day!!!!!!!!<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11978">tempest</a> — Mon Apr 23, 2012 6:01 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[willyw]]></name></author>
		<updated>2012-04-23T14:34:39-04:00</updated>

		<published>2012-04-23T14:34:39-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=99244#p99244</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=99244#p99244"/>
		<title type="html"><![CDATA[Re: !stop command when bot it outputting text file.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=99244#p99244"><![CDATA[
<blockquote class="uncited"><div>i have a small script that reads a text file to a channel. some times the files are long and would like to have a !stop command... however just adding a proc and binding !stop does not work as the loop that is reading the file is queuing up the output command... i don't know if its a hard thing or not, but im not that good with tcl... any pointers would be good. <br><br>...</div></blockquote>Try this:<br><div class="codebox"><p>Code: </p><pre><code>bind pub - "!hypno_stop" hypno_stopproc hypno_stop {nick uhost handle chan text} {clearqueue mode}</code></pre></div><br>Reference: <br><a href="http://www.eggheads.org/support/egghtml/1.6.21/tcl-commands.html" class="postlink">http://www.eggheads.org/support/egghtml ... mands.html</a><br>and find:<blockquote class="uncited"><div>clearqueue &lt;queue&gt;<br><br>    Description: removes all messages from a queue. Valid arguments are: mode, server, help, or all.</div></blockquote>I hope this helps.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10420">willyw</a> — Mon Apr 23, 2012 2:34 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[tempest]]></name></author>
		<updated>2012-04-23T08:11:10-04:00</updated>

		<published>2012-04-23T08:11:10-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=99242#p99242</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=99242#p99242"/>
		<title type="html"><![CDATA[!stop command when bot it outputting text file.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=99242#p99242"><![CDATA[
i have a small script that reads a text file to a channel. some times the files are long and would like to have a !stop command... however just adding a proc and binding !stop does not work as the loop that is reading the file is queuing up the output command... i don't know if its a hard thing or not, but im not that good with tcl... any pointers would be good. <br><br>here is the code.<br><div class="codebox"><p>Code: </p><pre><code>proc Hypno_Reader {nick uhost hand chan text} {     set number [lindex [split $text] 0]     set filename ${::trance_file}/${number}.txt     if {![file exists $filename]} {         putquick "NOTICE $chan :Trance file not found."         return     }     set tracks [open $filename]     set data [split [read -nonewline $tracks] \n]     close $tracks     putquick "PRIVMSG #TheGridTestingArea : Loading your file ..."    putquick "PRIVMSG ##TheGridTestingArea : We hope you enjoy..."    foreach trance_line $data {         putquick "PRIVMSG #TheGridTestingArea :$trance_line"     }  } </code></pre></div>thanks in advance!<br><br>Tempest.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11978">tempest</a> — Mon Apr 23, 2012 8:11 am</p><hr />
]]></content>
	</entry>
	</feed>
