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

	<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-06-16T11:23:03-04:00</updated>

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

		<entry>
		<author><name><![CDATA[darton]]></name></author>
		<updated>2006-06-16T11:23:03-04:00</updated>

		<published>2006-06-16T11:23:03-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=64100#p64100</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=64100#p64100"/>
		<title type="html"><![CDATA[Timer problem]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=64100#p64100"><![CDATA[
OK, I added the line "foreach chan [channels]" and it works now. Annoying that every variable is deleted by invoking another proc.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7270">darton</a> — Fri Jun 16, 2006 11:23 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[darton]]></name></author>
		<updated>2006-06-16T11:10:36-04:00</updated>

		<published>2006-06-16T11:10:36-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=64099#p64099</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=64099#p64099"/>
		<title type="html"><![CDATA[Timer problem]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=64099#p64099"><![CDATA[
This here does not work.<div class="codebox"><p>Code: </p><pre><code>set votefile "scripts/vote.txt"if {![file exists $votefile]} {catch {close [open $votefile w]}}setudef flag votebind pub - !vote votescriptproc votescript {nick uhost hand chan arg} { global votefile  channel set $chan +vote  putquick "PRIVMSG $chan :Vote initiated by $nick: $arg Type !poll yes and !poll no"      utimer 60 do:vote}proc do:vote {} {  channel set $chan -vote   set fp [open $votefile "r"]    set data [read -nonewline $fp]   close $fp    set lines [split $data "\n"]    set num 0   set randline [lindex $lines $num]    set yes [lindex $randline 0]   set no [lindex $randline 1]  putquick "PRIVMSG $chan :Voting period over. Results: Yes: $yes, No: $no"  set fd [open $::votefile r+]   while {![eof $fd]} {      lappend list [gets $fd]   }   set list [lreplace $list 0 0 [list 0 0]]   seek $fd 0   puts -nonewline $fd [join $list \n]   close $fd  }</code></pre></div><blockquote class="uncited"><div>Tcl error in script for 'timer182':<br>can't read "chan": no such variable</div></blockquote><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7270">darton</a> — Fri Jun 16, 2006 11:10 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[user]]></name></author>
		<updated>2006-06-16T09:36:16-04:00</updated>

		<published>2006-06-16T09:36:16-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=64097#p64097</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=64097#p64097"/>
		<title type="html"><![CDATA[Timer problem]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=64097#p64097"><![CDATA[
<blockquote class="uncited"><div>How can I invoke another proc after a special time?</div></blockquote>timer, utimer (provided by eggdrop) or after (native tcl command)<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2878">user</a> — Fri Jun 16, 2006 9:36 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[darton]]></name></author>
		<updated>2006-06-16T09:24:03-04:00</updated>

		<published>2006-06-16T09:24:03-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=64096#p64096</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=64096#p64096"/>
		<title type="html"><![CDATA[Timer problem]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=64096#p64096"><![CDATA[
How can I invoke another proc after a special time?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7270">darton</a> — Fri Jun 16, 2006 9:24 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[demond]]></name></author>
		<updated>2006-06-16T01:13:38-04:00</updated>

		<published>2006-06-16T01:13:38-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=64075#p64075</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=64075#p64075"/>
		<title type="html"><![CDATA[Timer problem]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=64075#p64075"><![CDATA[
proc's are not to be put to sleep by timer; you should get your proc chores done as soon as possible and relinquish control to eggdrop, thus conforming to its event-driven I/O model<br><br>what you need to do is usually done by registering a timer which will invoke the specified proc after a short period of time<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5056">demond</a> — Fri Jun 16, 2006 1:13 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[darton]]></name></author>
		<updated>2006-06-15T15:07:59-04:00</updated>

		<published>2006-06-15T15:07:59-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=64050#p64050</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=64050#p64050"/>
		<title type="html"><![CDATA[Timer problem]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=64050#p64050"><![CDATA[
Hello!<br>I began to make a vote script. So maybe you can help me with a timer. In the following code I marked the line where I want to insert a timer.<div class="codebox"><p>Code: </p><pre><code>set votefile "scripts/vote.txt"if {![file exists $votefile]} {catch {close [open $votefile w]}}setudef flag votebind pub - !vote votescriptproc votescript {nick uhost hand chan arg} { global votefile  channel set $chan +vote  putquick "PRIVMSG $chan :Vote initiated by $nick: $arg Type !poll yes and !poll no"  ####Here a timer must be inserted. After 1 minute the bot should continue with the rest of this script.  channel set $chan -vote   set fp [open $votefile "r"]    set data [read -nonewline $fp]   close $fp    set lines [split $data "\n"]    set num 0   set randline [lindex $lines $num]    set yes [lindex $randline 0]   set no [lindex $randline 1]  putquick "PRIVMSG $chan :Voting period over. Results: Yes: $yes, No: $no"  set fd [open $::votefile r+]   while {![eof $fd]} {      lappend list [gets $fd]   }   set list [lreplace $list 0 0 [list 0 0]]   seek $fd 0   puts -nonewline $fd [join $list \n]   close $fd  }</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7270">darton</a> — Thu Jun 15, 2006 3:07 pm</p><hr />
]]></content>
	</entry>
	</feed>
