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

	<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>2004-08-24T15:43:19-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Dedan]]></name></author>
		<updated>2004-08-24T15:43:19-04:00</updated>

		<published>2004-08-24T15:43:19-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=40120#p40120</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=40120#p40120"/>
		<title type="html"><![CDATA[Need help with utimer then killutimer]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=40120#p40120"><![CDATA[
you have:<br>utimer 120 [list pass_ck $nick $host $hand &amp;text] <br><br>foreach t [utimers] { if {[lindex $t 1] == "ch_pass"} { killutimer [lindex $t end] } } <br><br><br>try:<br>foreach t [utimers] { if {[lindex $t 1] == "pass_ck"} { killutimer [lindex $t end] } } <br><br>btw<br>is &amp;text supposet to be $text?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3472">Dedan</a> — Tue Aug 24, 2004 3:43 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[awyeah]]></name></author>
		<updated>2004-08-23T00:34:46-04:00</updated>

		<published>2004-08-23T00:34:46-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=40037#p40037</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=40037#p40037"/>
		<title type="html"><![CDATA[Re: Need help with utimer then killutimer]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=40037#p40037"><![CDATA[
<blockquote class="uncited"><div>I am tring to start a timer which runs a proc<br><br>utimer 120 [proc]</div></blockquote>You would have to mention "list" as well.<br><div class="codebox"><p>Code: </p><pre><code>utimer 120 [list proc_name arg1 arg2 arg3]</code></pre></div>If you don't have any variables to pass then simply use <ul><li><blockquote class="uncited"><div>and in the proc that is runs I want to do a <br><br>if {"match this" } { do that <strong class="text-strong">and "killutimer"</strong>} {no match "do this"}</div></blockquote>For this, you can do something like:<br><div class="codebox"><p>Code: </p><pre><code>#This command will loop the utimer, make sure it is in the #procedure and not outside it.if {(![string match *spam* [utimers]])} { utimer $spamidle spam:cycle }#To kill all matching utimersforeach check_utimer [utimers] { if {[string match "awyeah*" [lindex $check_utimer 1]]} {   killutimer [lindex [split [lindex $check_utimer 2] "\}"] 0]   }}</code></pre></div></li></ul><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4875">awyeah</a> — Mon Aug 23, 2004 12:34 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2004-08-22T22:07:53-04:00</updated>

		<published>2004-08-22T22:07:53-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=40029#p40029</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=40029#p40029"/>
		<title type="html"><![CDATA[Need help with utimer then killutimer]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=40029#p40029"><![CDATA[
ok I tried both   neither worked   <br><br>no errors    they just didn't kill the utimer <br>and the <br><br>  # Commence with the kickban <br>  putlog "$nick did not reply or pass was wrong" <br>  putserv "PRIVMSG $nick :Wrong password or no reply"<br><br>still fired<br>which I don't want to happen<br>I will post part of the script this time<br>    <br>Please help a newbie out  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"> <br><br>as you will see I have the first reply, to my post, added to the script<br><br># Process the version reply for mirc<br>proc reply:version_check { nick host hand dest keyword text } {<br>global ch_pass botnick<br><br>set reply [string tolower $text]<br>if { [string match "*mirc*" "$reply"] } {<br>putserv "PRIVMSG $nick :Channel Password $ch_pass"<br>putserv "PRIVMSG $nick : Type /msg $botnick password &lt;channel password&gt; (In 2 minute you will be ban, if you don't reply)"<br>utimer 120 [list pass_ck $nick $host $hand &amp;text]<br>}<br>}<br><br>#process the Password reply<br>bind msg - password pass_ck<br>proc pass_ck { nick host hand text } { <br>global channel ch_pass<br>if { $text == "$ch_pass"} {  <br>foreach t [utimers] { if {[lindex $t 1] == "ch_pass"} { killutimer [lindex $t end] } }<br>putserv "PRIVMSG $nick :Password accepted"<br>putlog "$nick Password accepted" } {<br># Commence with the kickban<br>putlog "$nick did not reply or pass was wrong"<br>putserv "PRIVMSG $nick :Wrong password or no reply"<br>putquick "MODE $channel +b [maskhost $host]"<br>putquick "KICK $channel $nick :Scripts are not welcome here."<p>Statistics: Posted by Guest — Sun Aug 22, 2004 10:07 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[DayCuts]]></name></author>
		<updated>2004-08-22T15:05:10-04:00</updated>

		<published>2004-08-22T15:05:10-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=40010#p40010</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=40010#p40010"/>
		<title type="html"><![CDATA[Need help with utimer then killutimer]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=40010#p40010"><![CDATA[
Your right, timers in tcl are not recurring, they run once only, so when your proc is called from the timer, it is automatically stopped.   No need for the use of killtimer or any proc to search for it as it wont exist.<br><br>However when i need to check and kill a timer, i simple use something like this...<div class="codebox"><p>Code: </p><pre><code>if {[timerexists proc]!=""} { killtimer [timerexists proc] }</code></pre></div>This has worked fine in all cases i have needed to kill a timer.  'proc' is the name of the proc the timer is set to call.  [timerexists proc] returns the timer# of the timer.  Obviously if you are using a utimer, your commands would be utimerexists and killutimer instead.<br><br>But remember that line of code is in its simplest form, in my cases i never have multiple timers set to run the same proc so it works fine.  But if you have multiple (u)timers active at the same time, set to call the same proc.  You will no doubt get an error because [timerexists proc] would return the timer#'s of more than one timer.  (A simple loop would work fine if you wished to kill all timers set for that proc)<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5073">DayCuts</a> — Sun Aug 22, 2004 3:05 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Jil Larner]]></name></author>
		<updated>2004-08-22T10:25:30-04:00</updated>

		<published>2004-08-22T10:25:30-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=40002#p40002</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=40002#p40002"/>
		<title type="html"><![CDATA[Need help with utimer then killutimer]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=40002#p40002"><![CDATA[
hi,<br><br>uh... timer is automatically killed when finished running proc. No ?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5337">Jil Larner</a> — Sun Aug 22, 2004 10:25 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Dedan]]></name></author>
		<updated>2004-08-22T06:33:58-04:00</updated>

		<published>2004-08-22T06:33:58-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=39990#p39990</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=39990#p39990"/>
		<title type="html"><![CDATA[Need help with utimer then killutimer]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=39990#p39990"><![CDATA[
Timers seem to be a mystery for tcl,<br>everyone seems to do them differently.<br><br>some make a timer in a var and then check for it,<br>others use different ways to 'search" the timers<br>for the timer they are looking for, <br>ie. string match where i use "=="<br><br>The below is ripped from my script and works:<br><br>*** note ***<br>be careful that you are searching [utimers] for<br>second timers and using killutimer<br>Searching [timers] for minute timers, using killtimer<br><div class="codebox"><p>Code: </p><pre><code>timer 30 [list AV_unban $host]foreach t [timers] {  if {[lindex $t 1] == "AV_unban"} {    killtimer [lindex $t end]  }}utimer 37 [list Part_dec $host:$channel]foreach t [utimers] {  if {[lindex $t 1] == "Part_dec"} {    killutimer [lindex $t end]  }}</code></pre></div>i hope this helps, i am sure others will show you<br>other ways to do this, give them a try and <br>see what  works for you    <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_cool.gif" width="15" height="15" alt="8)" title="Cool"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3472">Dedan</a> — Sun Aug 22, 2004 6:33 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2004-08-22T05:50:40-04:00</updated>

		<published>2004-08-22T05:50:40-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=39989#p39989</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=39989#p39989"/>
		<title type="html"><![CDATA[Need help with utimer then killutimer]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=39989#p39989"><![CDATA[
first    Newbie here <br><br>I am tring to start a timer which runs a proc<br><br>utimer 120 [proc]<br><br>and in the proc that is runs I want to do a <br><br>if {"match this" } { do that <strong class="text-strong">and "killutimer"</strong>} {no match "do this"}<br><br>(I know how to "match this" "do That" and "do this"   <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile">  )<br><br>I have tried all kinds of things that I have read or seen in scripts<br>but all I come up with are errors<br><br>Please help a newbie understand how this works<br><br>I may have to post what I have but,   I'll start with this     Thanks<p>Statistics: Posted by Guest — Sun Aug 22, 2004 5:50 am</p><hr />
]]></content>
	</entry>
	</feed>
