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

	<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-02-13T14:54:01-04:00</updated>

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

		<entry>
		<author><name><![CDATA[VaVaVooM]]></name></author>
		<updated>2003-02-13T14:54:01-04:00</updated>

		<published>2003-02-13T14:54:01-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=16551#p16551</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=16551#p16551"/>
		<title type="html"><![CDATA[vwait won't wait forever..]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=16551#p16551"><![CDATA[
thanks ppslim <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"> <br>i caught the idea..<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2703">VaVaVooM</a> — Thu Feb 13, 2003 2:54 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ppslim]]></name></author>
		<updated>2003-02-13T12:29:45-04:00</updated>

		<published>2003-02-13T12:29:45-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=16549#p16549</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=16549#p16549"/>
		<title type="html"><![CDATA[vwait won't wait forever..]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=16549#p16549"><![CDATA[
This doesn't work, for the reasons stated.<br><br>Eggdrop Tcl scripts, are not background tasks, or at least not in the Tcl scope of background tasks.<br><br>vwait is designed to block the main loop, until the data required to continue is processed. The problem with eggdrop, the the RAW bind won't be triggered until the main lopp has cycled at least once.<br><br>You will have to store any data that is needed to send information elewhere, in global memory. Once you have any RAW retuened data needed, you can use this stored information to forward other details on.<br><br>IE, it's the reverse of what you are currently using.<br><br>Instead of freezing the current proc until you have the data needed. You freeze the data needed (store it in a variable) and use it once you have the rest of the info.<br><br>Here is a fake example.<br><div class="codebox"><p>Code: </p><pre><code>bind pub - "!test" tester1proc tester1 {nick uh hand chan arg} {  global SendTo  set SendTo [lindex [split $arg] 0]  putserv "COMMAND [lindex [split $arg] 1]"}bind RAW - "123" raw:testproc raw:test {fro  key arg} {  global SendTo  putserv "PRIVMSG $SendTo: [lindex [split $arg] 0]"}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2">ppslim</a> — Thu Feb 13, 2003 12:29 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[VaVaVooM]]></name></author>
		<updated>2003-02-13T11:12:45-04:00</updated>

		<published>2003-02-13T11:12:45-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=16545#p16545</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=16545#p16545"/>
		<title type="html"><![CDATA[vwait won't wait forever..]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=16545#p16545"><![CDATA[
This is the tcl.. self explanatory.. i think  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"> <br><br>proc vald {nick} {putserv "whois $nick"}<br>bind raw - 311 val:user<br>proc val:user {from keyword text} {<br>global val<br>{...}<br>set val 1<br>return 0<br>}<br><br>bind pub - !val nfo<br>proc nfo {nick uhost hand chan text} {<br>global val<br>set val 0<br>vald $nick<br>vwait val<br>{...}<br>}<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2703">VaVaVooM</a> — Thu Feb 13, 2003 11:12 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ppslim]]></name></author>
		<updated>2003-02-13T09:28:48-04:00</updated>

		<published>2003-02-13T09:28:48-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=16542#p16542</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=16542#p16542"/>
		<title type="html"><![CDATA[vwait won't wait forever..]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=16542#p16542"><![CDATA[
This error happens when there are no background tasks to perform in Tcl, and not eggdrop.<br><br>Background tasks include socket based events (when registered to a command with the "filevent" command), the after command and likely a few other I can't be bothered to remember about.<br><br>What it doesn't do, is pause execution of one script, until another task has been completed.<br><br>It waits until a registered background task changes the value, to the variable passed to vwait.<br><br>Thus, if no background tasks are registered, it will simply wait forever, as there is nothing to.<br><br>Another thing the vwait command doesn't do, is continue with the rest of life. It pauses at the current point in code, and only performs Tcl registered events, and nothing else (this includes no processing any eggdrop stuff).<br><br>THere are ways to pause the action, while not blocking, or using the Tcl event system. However, there is real example that can be shown.<br><br>Maybe if we knew a little more of what you are trying to do, we can help.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2">ppslim</a> — Thu Feb 13, 2003 9:28 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[VaVaVooM]]></name></author>
		<updated>2003-02-13T09:11:01-04:00</updated>

		<published>2003-02-13T09:11:01-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=16541#p16541</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=16541#p16541"/>
		<title type="html"><![CDATA[vwait won't wait forever..]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=16541#p16541"><![CDATA[
hello there!  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"> <br><br>I would like to know if there is another tcl command equal (or like) the '<em class="text-italics">vwait</em>' that will halt the tcl script that is currently running, until a variable is set.. The problem is that if i use the '<em class="text-italics">vwait</em>' command, witch is mostly used for client/server and/or socket connections, i constantly get the error "<span style="text-decoration:underline">Tcl error [pr:test]: can't wait for variable "val":  would wait forever</span>"  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_evil.gif" width="15" height="15" alt=":evil:" title="Evil or Very Mad"> , and this tcl is not to used in any client/server and/or socket connections...<br><br>thanks..<br>..for the help  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2703">VaVaVooM</a> — Thu Feb 13, 2003 9:11 am</p><hr />
]]></content>
	</entry>
	</feed>
