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

	<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>2009-08-17T14:21:47-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2009-08-17T14:21:47-04:00</updated>

		<published>2009-08-17T14:21:47-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=89936#p89936</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=89936#p89936"/>
		<title type="html"><![CDATA[Avoid dupplication of timer]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=89936#p89936"><![CDATA[
You might want to [split $text] before applying [lindex] on it.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Mon Aug 17, 2009 2:21 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[neoclust]]></name></author>
		<updated>2009-08-17T08:54:03-04:00</updated>

		<published>2009-08-17T08:54:03-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=89930#p89930</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=89930#p89930"/>
		<title type="html"><![CDATA[Avoid dupplication of timer]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=89930#p89930"><![CDATA[
Thank TCL_no_TK &amp; Sir_Fz it work<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10812">neoclust</a> — Mon Aug 17, 2009 8:54 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[TCL_no_TK]]></name></author>
		<updated>2009-08-17T04:56:13-04:00</updated>

		<published>2009-08-17T04:56:13-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=89925#p89925</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=89925#p89925"/>
		<title type="html"><![CDATA[Avoid dupplication of timer]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=89925#p89925"><![CDATA[
sud only allow the bot to send out the "Welcome" message to a <strong class="text-strong">nickname</strong> once a day.<br><br> <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_arrow.gif" width="15" height="15" alt=":arrow:" title="Arrow"> it looks like this is a raw event, in which case i doubt you'd be wanting to return 1<br><div class="codebox"><p>Code: </p><pre><code> proc Channel:check {from kw text} {   global botnick    set chan [lindex $text 1]    set host [lindex $text 2]@[lindex $text 3]    set nick [lindex $text 5]    set flag [lindex $text 6]     if {[string index $flag 1] == ""} {       if {![channel get $chan autovoice]} {       return      }        if {![botisop $chan]} {        return       }         if {$nick != $botnick} {          if {[string length [set t [utimerexists procname]]]} { killutimer $t }          switch -glob -- $host {           *.dynamic.jazztel.es {            Channel:check:welcome $nick            utimer 10 [list pushmode $chan +v $nick]           }           ~*@* {            Channel:check:welcome $nick            utimer 30 [list pushmode $chan +v $nick]           }           default {            Channel:check:welcome $nick            utimer 10 [list pushmode $chan +v $nick]           }          }     return                                                                                                                                                                                                }     } } proc Channel:check:welcome {nick} {  global cc_tmp   if {![info exists cc_tmp($nick)]} {    set cc_tmp($nick) [clock seconds]    puthelp "NOTICE $nick :Welcome"    return   } elseif {[string equal [clock scan "yesterday"] $cc_tmp($nick)]} {    set cc_tmp($nick) [clock seconds]    puthelp "NOTICE $nick :Welcome"    return   } else {    return   } }</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8130">TCL_no_TK</a> — Mon Aug 17, 2009 4:56 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[neoclust]]></name></author>
		<updated>2009-08-16T14:45:03-04:00</updated>

		<published>2009-08-16T14:45:03-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=89921#p89921</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=89921#p89921"/>
		<title type="html"><![CDATA[Avoid dupplication of timer]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=89921#p89921"><![CDATA[
the bot sends several notice before voice, there is a way to limit this set, for example at the beginning if the nick is already handled by the timer it must pass a return 0<br>and i have this error : <blockquote class="uncited"><div>can't unset "vtimers(neoclust:#chan)": no such variable</div></blockquote><blockquote class="uncited"><div>[19:40:00] -Egg- Welcome.<br>[19:40:12] -Egg- Welcome.<br>[19:40:26] *** Egg sets mode: +v neoclust<br>[19:40:29] -Egg- Welcome.</div></blockquote>[/quote]<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10812">neoclust</a> — Sun Aug 16, 2009 2:45 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[neoclust]]></name></author>
		<updated>2009-08-16T14:57:59-04:00</updated>

		<published>2009-08-16T14:38:33-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=89920#p89920</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=89920#p89920"/>
		<title type="html"><![CDATA[Avoid dupplication of timer]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=89920#p89920"><![CDATA[
There is an ']' missing in this line: <blockquote class="uncited"><div>if {![string match ~* $host ] &amp;&amp; ![info exists vtimers($nick:$chan)]} {</div></blockquote>and it must also apply this line <blockquote class="uncited"><div>set vtimers($nick:$chan) [utimer 10 [list voice:nick $chan $nick]]</div></blockquote> in switch <br><div class="codebox"><p>Code: </p><pre><code>proc Channel:check {from kw text} {   global botnick vtimers   set chan [lindex $text 1]   set host [lindex $text 2]@[lindex $text 3]   set nick [lindex $text 5]   set flag [lindex $text 6]   if {[string index $flag 1] == ""} {      if {![channel get $chan autovoice]} { return 0 }      if {![botisop $chan]} { return 0 }      if {$nick != $botnick} {         if {[string length [set t [utimerexists Channel:check]]]} { killutimer $t }         if {![string match ~* $host ] &amp;&amp; ![info exists vtimers($nick:$chan)]} {            puthelp "NOTICE $nick :Welcome."            set vtimers($nick:$chan) [utimer 10 [list voice:nick $chan $nick]]         }         switch -glob -- $host {*.dynamic.jazztel.es            {puthelp "NOTICE $nick :Welcome."; set vtimers($nick:$chan) [utimer 10 [list voice:nick $chan $nick]] }            ~*@* { puthelp "NOTICE $nick :Welcome."; set vtimers($nick:$chan) [utimer 30 [list voice:nick $chan $nick]] }         }         return 0                                                                                                                                                                                                     }   }}proc voice:nick {chan nick} { global vtimers pushmode $chan +v $nick unset vtimers($nick:$chan)}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10812">neoclust</a> — Sun Aug 16, 2009 2:38 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2009-08-16T14:20:44-04:00</updated>

		<published>2009-08-16T14:20:44-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=89919#p89919</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=89919#p89919"/>
		<title type="html"><![CDATA[Avoid dupplication of timer]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=89919#p89919"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>proc Channel:check {from kw text} {   global botnick vtimers   set chan [lindex $text 1]   set host [lindex $text 2]@[lindex $text 3]   set nick [lindex $text 5]   set flag [lindex $text 6]   if {[string index $flag 1] == ""} {      if {![channel get $chan autovoice]} { return 0 }      if {![botisop $chan]} { return 0 }      if {$nick != $botnick} {         if {[string length [set t [utimerexists procname]]]} { killutimer $t }         if {![string match ~* $host ] &amp;&amp; ![info exists vtimers($nick:$chan)} {            puthelp "NOTICE $nick :Welcome."            set vtimers($nick:$chan) [utimer 10 [list voice:nick $chan $nick]]         }         switch -glob -- $host {*.dynamic.jazztel.es            {puthelp "NOTICE $nick :Welcome."; utimer 10 "pushmode $chan +v $nick" }            ~*@* { puthelp "NOTICE $nick :Welcome."; utimer 30 "pushmode $chan +v $nick" }         }         return 0                                                                                                                                                                                                     }   }}proc voice:nick {chan nick} { global vtimers pushmode $chan +v $nick unset vtimers($nick:$chan)}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Sun Aug 16, 2009 2:20 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[neoclust]]></name></author>
		<updated>2009-08-16T14:09:04-04:00</updated>

		<published>2009-08-16T14:09:04-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=89917#p89917</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=89917#p89917"/>
		<title type="html"><![CDATA[Avoid dupplication of timer]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=89917#p89917"><![CDATA[
I want to apply a method to avoid duplication of timers, thanks<br><div class="codebox"><p>Code: </p><pre><code>proc Channel:check {from kw text} {global botnickset chan [lindex $text 1]set host [lindex $text 2]@[lindex $text 3]set nick [lindex $text 5]set flag [lindex $text 6]if {[string index $flag 1] == ""} {if {![channel get $chan autovoice]} { return 0 }if {![botisop $chan]} { return 0 }if {$nick != $botnick} {if {[string length [set t [utimerexists procname]]]} { killutimer $t }if {![string match ~* $host ]} {puthelp "NOTICE $nick :Welcome."utimer 10 "pushmode $chan +v $nick"}switch -glob -- $host {*.dynamic.jazztel.es {puthelp "NOTICE $nick :Welcome."; utimer 10 "pushmode $chan +v $nick" }~*@* { puthelp "NOTICE $nick :Welcome."; utimer 30 "pushmode $chan +v $nick" }}return 0                                                                                                                                                                                                     }}}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10812">neoclust</a> — Sun Aug 16, 2009 2:09 pm</p><hr />
]]></content>
	</entry>
	</feed>
