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

	<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>2015-05-26T16:15:00-04:00</updated>

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

		<entry>
		<author><name><![CDATA[juanamores]]></name></author>
		<updated>2015-05-26T16:15:00-04:00</updated>

		<published>2015-05-26T16:15:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=104163#p104163</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=104163#p104163"/>
		<title type="html"><![CDATA[Killtimers timerID...]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=104163#p104163"><![CDATA[
<blockquote class="uncited"><div>Also, if you expect to need the timer id often, store it in a variable when you set the timer...<div class="codebox"><p>Code: </p><pre><code>set utimerid [utimer 120 [list putquick [encoding convertfrom utf-8 "PRIVMSG $chan :This is a quick message converted to UTF-8"]]]</code></pre></div></div></blockquote>Thanks to the contribution <strong class="text-strong">willyw</strong>.<br>I liked the idea of<strong class="text-strong"> SpiKe^^</strong> to keep the timerID in a variable, I tried it and it works perfect. <br>Thank you both.  <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=12499">juanamores</a> — Tue May 26, 2015 4:15 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[SpiKe^^]]></name></author>
		<updated>2015-05-26T10:32:50-04:00</updated>

		<published>2015-05-26T10:32:50-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=104162#p104162</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=104162#p104162"/>
		<title type="html"><![CDATA[Killtimers timerID...]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=104162#p104162"><![CDATA[
Also, if you expect to need the timer id often, store it in a variable when you set the timer...<div class="codebox"><p>Code: </p><pre><code>set utimerid [utimer 120 [list putquick [encoding convertfrom utf-8 "PRIVMSG $chan :This is a quick message converted to UTF-8"]]]</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7749">SpiKe^^</a> — Tue May 26, 2015 10:32 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[willyw]]></name></author>
		<updated>2015-05-26T09:41:46-04:00</updated>

		<published>2015-05-26T09:41:46-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=104161#p104161</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=104161#p104161"/>
		<title type="html"><![CDATA[Re: Killtimers timerID...]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=104161#p104161"><![CDATA[
Play with this.<br>It is not meant for any actual use.  It is just meant to illustrate.<br><div class="codebox"><p>Code: </p><pre><code># May 26, 2015# http://forum.egghelp.org/viewtopic.php?p=104159&amp;sid=f40235b3e21a35b95678280c8ef33c3f#104159### this finds only the first instancebind pub - "!timers" search_timersproc search_timers {nick uhost handle chan text} {        putserv "privmsg $chan :timers are: [timers]"        putserv "privmsg $chan :text is: $text"        putserv "privmsg $chan :position in list of timers is: [lsearch -index 1 [timers] "*$text*" ] "        set pos [lsearch -index 1 [timers] "*$text*" ]        putserv "privmsg $chan :selected timer is: [lindex [timers] $pos]"        set selected [lindex [timers] $pos]        putserv "privmsg $chan :timer id is: [lindex $selected 2]"}###################  this will list all timers that matchbind pub - "!timersagain" find_all_timer_matchesproc find_all_timer_matches {nick uhost handle chan text} {        putserv "privmsg $chan :timers are: [timers]"        putserv "privmsg $chan :text is: $text"        set pos "[lsearch -index 1 -all [timers] "*$text*" ]"        putserv "privmsg $chan :selected timers are in these positions : $pos "        foreach num $pos {                putserv "privmsg $chan :timer is: [lindex [timers] $num]"        }        foreach num $pos {                putserv "privmsg $chan :timerid is: [lindex [timers] $num 2]"        }}</code></pre></div>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.tcl.tk/man/tcl8.6/TclCmd/lindex.htm" class="postlink">http://www.tcl.tk/man/tcl8.6/TclCmd/lindex.htm</a><br>and<br><a href="http://www.tcl.tk/man/tcl8.6/TclCmd/lsearch.htm" class="postlink">http://www.tcl.tk/man/tcl8.6/TclCmd/lsearch.htm</a><br>You may wish to experiment with the -nocase switch.<br><br>I hope this helps.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10420">willyw</a> — Tue May 26, 2015 9:41 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[juanamores]]></name></author>
		<updated>2015-05-26T05:34:28-04:00</updated>

		<published>2015-05-26T05:34:28-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=104159#p104159</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=104159#p104159"/>
		<title type="html"><![CDATA[Killtimers timerID...]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=104159#p104159"><![CDATA[
How to find the timerID from these examples?<br><strong class="text-strong">1)</strong><div class="codebox"><p>Code: </p><pre><code>utimer 120 [list putquick [encoding convertfrom utf-8 "PRIVMSG $chan :This is a quick message converted to UTF-8"]]</code></pre></div><strong class="text-strong">2)</strong><div class="codebox"><p>Code: </p><pre><code>timer 3 [list putmsg $chan "Hello world"]</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12499">juanamores</a> — Tue May 26, 2015 5:34 am</p><hr />
]]></content>
	</entry>
	</feed>
