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

	<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-07-16T21:55:44-04:00</updated>

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

		<entry>
		<author><name><![CDATA[KnightHawk]]></name></author>
		<updated>2003-07-16T21:55:44-04:00</updated>

		<published>2003-07-16T21:55:44-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=23588#p23588</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=23588#p23588"/>
		<title type="html"><![CDATA[Autovoice script gets caught in loop for first channel]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=23588#p23588"><![CDATA[
Sorry its been awhile since my last post.  After careful review of the suggestions, and some serioous studying yet again of coding, things are working very smoothly now, bot voices it self, voices users...etc....without the loop that was there, and it has seriously helped reduce the lag issue. Had to separate it into 2 procs, but thats ok, as long as it works  better and more efficiently than it was <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><br>Here is the coding i have at this point:<div class="codebox"><p>Code: </p><pre><code>bind join *|* * join_autovoicebind join *|* * botvoiceproc join_autovoice {nick uhost hand chan} { global voice_chans botnick set chan [string tolower $chan] foreach i [string tolower $voice_chans] {  if {$i == $chan &amp;&amp; [botisop $chan]} {   putquick "MODE $chan +v $nick"   putlog "$nick was voiced by me on $chan"  }  if {$i == $chan &amp;&amp; [botishalfop $chan]} {   putquick "MODE $chan +v $nick"   putlog "$nick was voiced by me on $chan"  } }}proc botvoice {nick uhost hand chan} { global voice_chans botnick if {$nick == $botnick} {  set chan [string tolower $chan]   foreach i [string tolower $voice_chans] {   if {$i == $chan} {    putquick "MODE $chan +v $botnick"    putlog "I voiced myslef on $chan"   }  } }}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3490">KnightHawk</a> — Wed Jul 16, 2003 9:55 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Dedan]]></name></author>
		<updated>2003-07-15T13:32:35-04:00</updated>

		<published>2003-07-15T13:32:35-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=23519#p23519</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=23519#p23519"/>
		<title type="html"><![CDATA[Autovoice script gets caught in loop for first channel]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=23519#p23519"><![CDATA[
knightHawk, try something like this,<br>maybe it will work for you.<br><div class="codebox"><p>Code: </p><pre><code># Channels you want to auto-voice Nicks on. # Multiple channels seperated by spaces.# set av-chans "#TCLhelp #TCLlovers"set av-chans "#chan1 #chan2 #chan3 #chan4 #chan5 #chan6 #chan7 #chan8 #chan9 #chan10" # The Settings below should work well for you, give them a try first# Set the Max Number of Joins hereset av-limit 3# During the Number of Seconds hereset av-sec 3# Set the Number of Seconds to wait before Voicing the Nick here 3# Do not set this below 1set av-time 2bind join - "*" auto:voiceproc auto:voice {nick uhost handle chan} {  global botnick av-chans av-limit av-sec av-time av-ctr av-mode  set chan [string tolower $chan]  if {![botisop $chan]} {    return 0  }  if {![info exists av-ctr([$chan])]} {return 0}  incr av-ctr($chan) 1  utimer $av-sec [list av:dec $chan]  if {$av-ctr($chan) &gt;= $av-limit} {    set av-mode($chan) 0    return 0  } else {    set av-mode($chan) 1    utimer $av-time [list av:voice $nick $chan]    return 0  }}proc av:voice {nick chan} {  av-mode  if {$av-mode($chan) == 0} {    return 0  }  if {[onchan $nick $chan] &amp;&amp; ![isvoice $nick $chan]} {    pushmode $chan +v $nick  } else {    return 0  }}proc av:dec {chan} {  global av-ctr  incr av-ctr($chan) -1}foreach chan [string tolower $av-chans] {   if {![info exists av-ctr([string tolower $chan])]} {     set av-ctr([string tolower $chan]) 0   }  if {![info exists av-mode([string tolower $chan])]} {     set av-mode([string tolower $chan]) 1   }}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3472">Dedan</a> — Tue Jul 15, 2003 1:32 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[stdragon]]></name></author>
		<updated>2003-07-13T19:56:17-04:00</updated>

		<published>2003-07-13T19:56:17-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=23444#p23444</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=23444#p23444"/>
		<title type="html"><![CDATA[Autovoice script gets caught in loop for first channel]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=23444#p23444"><![CDATA[
You're right, you did say you restarted the bot, but not everybody realizes the difference between restarting and rehashing. I was just making sure.<br><br>You probably should start over with your code. It's poorly designed right now. When a user joins the channel, you should only voice him on that channel. It doesn't make sense to voice him on all the channels in $voice_chans, because either he's only joined one of them, or he's already been voiced on the others when he joined those. And um, I'd leave out the voice_chan2 var, because it really doesn't make sense. Why is it easier to add a new channel to voice_chan2 than just voice_chans? heh<br><br>So, use lsearch to see if $chan is in $voice_chans. If it is, then send the +v for that nick on that channel only.<br><br>Also, can the bot voice himself when he joins a channel? When you first join you generally don't have ops, and thus can't voice anybody. So perhaps it would be better to use a mode bind and when the bot does get +o, then send a +v.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8">stdragon</a> — Sun Jul 13, 2003 7:56 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2003-07-13T19:19:14-04:00</updated>

		<published>2003-07-13T19:19:14-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=23443#p23443</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=23443#p23443"/>
		<title type="html"><![CDATA[Autovoice script gets caught in loop for first channel]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=23443#p23443"><![CDATA[
lol, didn't think of that.<br>but the reason i suggested this, is for example if a user joins the channel and service give him op, or voice (during the 4 seconds) then the bot won't do anything.<br><br>also u can make a code to *not* trigger the script on join floods or join/part floods, or u can do a killutimer if exists more than once on same nick... (but I'm not that good)<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Sun Jul 13, 2003 7:19 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[egghead]]></name></author>
		<updated>2003-07-13T19:00:43-04:00</updated>

		<published>2003-07-13T19:00:43-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=23442#p23442</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=23442#p23442"/>
		<title type="html"><![CDATA[Autovoice script gets caught in loop for first channel]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=23442#p23442"><![CDATA[
<blockquote class="uncited"><div>I would suggest another method<br><br>to creat a utimer checking if the user will get voice/op before dowing anything.<br>[snip]</div></blockquote>Just curious, why would you suggest that, aside from the fun of having a lot of timers running?<br><br>NightHawk has shown that one join triggers 14 modes +v in his case. Let us replace those modes by your timers. <br><br>Now suppose a small join/part floodnet of 50 bots joins the channel. Then 50 * 14 timers are started (700).<br><br>Or for more fun: suppose that that little floodnet joins all 14 channels listed. Then 14 * 50 * 14 timers are started. Which is slightly less than 10.000 timers.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=282">egghead</a> — Sun Jul 13, 2003 7:00 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2003-07-13T18:33:33-04:00</updated>

		<published>2003-07-13T18:33:33-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=23438#p23438</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=23438#p23438"/>
		<title type="html"><![CDATA[Autovoice script gets caught in loop for first channel]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=23438#p23438"><![CDATA[
I would suggest another method<br><br>to creat a utimer checking if the user will get voice/op before dowing anything.<br><br>like for example:<br><br>bind join * * join_autovoice<br><br>proc join_autovoice {nick host hand chan} { <br>   global voice_chans1 voice_chans2 <br>   foreach chan $voice_chans1 {<br>   utimer 4 "do:voice"<br>}<br>   foreach chan $voice_chans2 {<br>   utimer 4 "do:voice"<br> }<br>}<br>then creat a proc (do:voice) which will have if isvoice $nick and isop $nick return<br>and if isbot $nick return..... before voicing the user.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Sun Jul 13, 2003 6:33 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[KnightHawk]]></name></author>
		<updated>2003-07-13T18:05:42-04:00</updated>

		<published>2003-07-13T18:05:42-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=23436#p23436</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=23436#p23436"/>
		<title type="html"><![CDATA[Autovoice script gets caught in loop for first channel]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=23436#p23436"><![CDATA[
<blockquote class="uncited"><div><blockquote class="uncited"><div>Ok, tell ya what, in best interest of saving everyones time and headaches , if someone can suggest the proper coding, by all means do so.  I am willing to remove the entire script and start from scratch.  Bassically, all i want it do is auto voice every user that joins certain chans, including the bot itself, and have the ability to easily add and remove the chans that the auotvoice happens on.  I nt eh mean time, i will try the suggestion from egghelp on using the putlogs.  Will get back to ya shortly with the results</div></blockquote>KnightHawk, either:<br><br>- you come here to ask someone to write a script for you (in which case I would have ignored your posting right away)<br><br>or <br><br>- you start writing your own code and come to this forum when you have some problems debugging your code.<br><br>But you deciced, halfway to switch from the second to the first and subsequently indeed wasted my time.</div></blockquote>My apologies, i didnt mean to waste anyone time, merely save it for your/their benefits.  I have been troubleshooting this for a few months myself, so it isnt going to hurt me personally to try a few more days.<br>I mean after all, if the code i wrote is *that* screwed up, why spend more days trying to fix something that may not be fixable.  Why not just start from scratch., thats all i was trying to get at  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br>I am indeed trying the suggestions you mentioned, and the putlogs do indeed help.  I do better undertand now what u were saying regarding the <br>bind happening for 10 diff times.. Results below:<br>16:53 &lt;Talon&gt; [16:54] Autovoice triggered by KH-shower joining #HawksRealm<br>16:53 &lt;Talon&gt; [16:54] Entering loop 1 for #Hawksrealm #RealmRadio #DevCentral #Moonlight^Stroll #Lobby<br>16:53 &lt;Talon&gt; [16:54] Putquick mode +v for KH-shower on #Hawksrealm<br>16:53 &lt;Talon&gt; [16:54] Putquick mode +v for KH-shower on #RealmRadio<br>16:53 &lt;Talon&gt; [16:54] Putquick mode +v for KH-shower on #DevCentral<br>16:53 &lt;Talon&gt; [16:54] Putquick mode +v for KH-shower on #Moonlight^Stroll<br>16:53 &lt;Talon&gt; [16:54] Putquick mode +v for KH-shower on #Lobby<br>16:53 &lt;Talon&gt; [16:54] Entering loop 2 for #obscuredevotion #SystemSolutions #darkrift #blackcat #retroramma #riverfront #angelfalls #talelake #crimsontavern<br>16:53 &lt;Talon&gt; [16:54] Putquick mode +v for KH-shower on #obscuredevotion<br>16:53 &lt;Talon&gt; [16:54] Putquick mode +v for KH-shower on #SystemSolutions<br>16:53 &lt;Talon&gt; [16:54] Putquick mode +v for KH-shower on #darkrift<br>16:53 &lt;Talon&gt; [16:54] Putquick mode +v for KH-shower on #blackcat<br>16:53 &lt;Talon&gt; [16:54] Putquick mode +v for KH-shower on #retroramma<br>16:53 &lt;Talon&gt; [16:54] Putquick mode +v for KH-shower on #riverfront<br>16:53 &lt;Talon&gt; [16:54] Putquick mode +v for KH-shower on #angelfalls<br>16:53 &lt;Talon&gt; [16:54] Putquick mode +v for KH-shower on #talelake<br>16:53 &lt;Talon&gt; [16:54] Putquick mode +v for KH-shower on #crimsontavern<br><br>The above happened just as a result of me cycling 1 channel.<br><br>So following that methodology, i restarted the bot, and here is what i got:<br>17:02 &lt;Talon&gt; [17:03] Entering loop 1 for #Hawksrealm #RealmRadio #DevCentral #Moonlight^Stroll #Lobby<br>17:02 &lt;Talon&gt; [17:03] msg already queued. skipping: MODE #Hawksrealm +v Talon<br>17:02 &lt;Talon&gt; [17:03] Putquick mode +v for Talon on #Hawksrealm<br>17:02 &lt;Talon&gt; [17:03] Putquick mode +v for Talon on #RealmRadio<br>17:02 &lt;Talon&gt; [17:03] Putquick mode +v for Talon on #DevCentral<br>17:02 &lt;Talon&gt; [17:03] Putquick mode +v for Talon on #Moonlight^Stroll<br>17:02 &lt;Talon&gt; [17:03] Putquick mode +v for Talon on #Lobby<br>17:02 &lt;Talon&gt; [17:03] Entering loop 2 for #obscuredevotion #SystemSolutions #darkrift #blackcat #retroramma #riverfront #angelfalls #talelake #crimsontavern<br>17:02 &lt;Talon&gt; [17:03] Putquick mode +v for Talon on #obscuredevotion<br>17:02 &lt;Talon&gt; [17:03] Putquick mode +v for Talon on #SystemSolutions<br>17:02 &lt;Talon&gt; [17:03] Putquick mode +v for Talon on #darkrift<br>17:02 &lt;Talon&gt; [17:03] Putquick mode +v for Talon on #blackcat<br>17:02 &lt;Talon&gt; [17:03] Putquick mode +v for Talon on #retroramma<br>17:02 &lt;Talon&gt; [17:03] Putquick mode +v for Talon on #riverfront<br>17:02 &lt;Talon&gt; [17:03] Putquick mode +v for Talon on #angelfalls<br>17:02 &lt;Talon&gt; [17:03] Putquick mode +v for Talon on #talelake<br>17:02 &lt;Talon&gt; [17:03] Putquick mode +v for Talon on #crimsontavern<br>( approximately 10 or more times).....so i can definately see how the lag is being created, although now there is 1 interesting twist, i dont get the msg already queued repated anymore, which is totally unexpected.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3490">KnightHawk</a> — Sun Jul 13, 2003 6:05 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[KnightHawk]]></name></author>
		<updated>2003-07-13T17:57:36-04:00</updated>

		<published>2003-07-13T17:57:36-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=23434#p23434</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=23434#p23434"/>
		<title type="html"><![CDATA[Autovoice script gets caught in loop for first channel]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=23434#p23434"><![CDATA[
KnightHawk, either:<br><br>- you come here to ask someone to write a script for you (in which case I would have ignored your posting right away)<br><br>or <br><br>- you start writing your own code and come to this forum when you have some problems debugging your code.<br><br>But you deciced, halfway to switch from the second to the first and subsequently indeed wasted my time.[/quote]<br><br>My apolgies sir, my intention is not to waste anyones time and efforts, am just trying to make it as easy as possible on people.  And no, i have nothave decided to swiutch from anything to anything, i am indeed following your suggestions on using the putlogs ,,,,which is indeed helping, and i am very appreciative for.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3490">KnightHawk</a> — Sun Jul 13, 2003 5:57 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[egghead]]></name></author>
		<updated>2003-07-13T18:00:09-04:00</updated>

		<published>2003-07-13T17:54:14-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=23433#p23433</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=23433#p23433"/>
		<title type="html"><![CDATA[Autovoice script gets caught in loop for first channel]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=23433#p23433"><![CDATA[
<blockquote class="uncited"><div>Ok, tell ya what, in best interest of saving everyones time and headaches , if someone can suggest the proper coding, by all means do so.  I am willing to remove the entire script and start from scratch.  Bassically, all i want it do is auto voice every user that joins certain chans, including the bot itself, and have the ability to easily add and remove the chans that the auotvoice happens on.  I nt eh mean time, i will try the suggestion from egghelp on using the putlogs.  Will get back to ya shortly with the results</div></blockquote>KnightHawk, either:<br><br>- you come here to ask someone to write a script for you (in which case I would have ignored your posting right away)<br><br>or <br><br>- you start writing your own code and come to this forum when you have some problems debugging your code.<br><br>But you deciced, halfway to switch from the second to the first and subsequently indeed wasted my time.<br><br>If you give up that easily on your script, it is unlikely you will get beyond the point of copying and pasting other people's snippets of Tcl into a text file and put your own name on top of it.<br><br>Do hope you will write your own script.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=282">egghead</a> — Sun Jul 13, 2003 5:54 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[KnightHawk]]></name></author>
		<updated>2003-07-13T17:46:29-04:00</updated>

		<published>2003-07-13T17:46:29-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=23431#p23431</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=23431#p23431"/>
		<title type="html"><![CDATA[Autovoice script gets caught in loop for first channel]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=23431#p23431"><![CDATA[
Ok, tell ya what, in best interest of saving everyones time and headaches , if someone can suggest the proper coding, by all means do so.  I am willing to remove the entire script and start from scratch.  Bassically, all i want it do is auto voice every user that joins certain chans, including the bot itself, and have the ability to easily add and remove the chans that the auotvoice happens on.  I nt eh mean time, i will try the suggestion from egghelp on using the putlogs.  Will get back to ya shortly with the results<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3490">KnightHawk</a> — Sun Jul 13, 2003 5:46 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[egghead]]></name></author>
		<updated>2003-07-13T17:36:26-04:00</updated>

		<published>2003-07-13T17:36:26-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=23429#p23429</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=23429#p23429"/>
		<title type="html"><![CDATA[Autovoice script gets caught in loop for first channel]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=23429#p23429"><![CDATA[
<blockquote class="uncited"><div>Yes, that is what a person would expect to happen, but is not the case on mine. If the bot resides on either 2 chans or 6, it still produces exatcly 17 (i recounted) messages. The messages are always for the same channel, which is the first channel listed in the voice_chans1 list, regardless of the name of that chan.</div></blockquote>Using putlogs you should be able to see what the bot does:<br><div class="codebox"><p>Code: </p><pre><code>set voice_chans1 "#chan1 #chan2 #chan3" set voice_chans2 "#chan4 #chan5 #chan6" bind join *|* * join_autovoice proc join_autovoice {nick host hand chan} {   global voice_chans1 voice_chans2    putlog "Autovoice triggered by $nick joining $chan"   putlog "Entering loop 1 for $voice_chans1"   foreach chan $voice_chans1 {       putlog "Putquick mode +v for $nick on $chan"    }    putlog "Entering loop 2 for $voice_chans2"   foreach chan $voice_chans2 {       putlog "Putquick mode +v for $nick on $chan"    } }</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=282">egghead</a> — Sun Jul 13, 2003 5:36 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[egghead]]></name></author>
		<updated>2003-07-13T17:04:42-04:00</updated>

		<published>2003-07-13T17:04:42-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=23426#p23426</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=23426#p23426"/>
		<title type="html"><![CDATA[Autovoice script gets caught in loop for first channel]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=23426#p23426"><![CDATA[
<blockquote class="uncited"><div>     <blockquote class="uncited"><div>Egghead wrote:<br>So, if your bot is on 10 channels, and all those 10 channels are also defined in the voice_chans1 variable, there will be 10 * 10 = 100 "mode +v" sent out. </div></blockquote> <br><br>Yes, that is what a person would expect to happen, but is not the case on mine.  If the bot resides on either 2 chans or 6, it still produces exatcly 17 (i recounted) messages.  The messages are always for the same channel, which is the first channel listed in the voice_chans1 list, regardless of the name of that chan. </div></blockquote>Can't confirm that. I tried it with my bot on 3 active channels. What eggdrop version are you running on what OS?<br><blockquote class="uncited"><div>     <blockquote class="uncited"><div>Egghead wrote:<br>A bind join is for 1 channel only, so you need to send out one +v for that channel. </div></blockquote>  <br><br>I was under the impression that bind *|* would tell it to bind to all channels</div></blockquote>Actually the binding you created is valid for all channels. So for any channel the bot monitors, a user joining that channel will trigger that binding.<br><br>BUT: it triggers them on a channel by channel basis. So, if a user joins 10 channels all monitored by your bot, that binding will be triggered 10 times. not one time.<br><blockquote class="uncited"><div>     <blockquote class="uncited"><div>Egghead wrote:<br>Besides that you need to implement a couple of checks (as indicated previously), like: is the bot on the channel, does the nick to be voiced already have voice, has the bot ops.</div></blockquote> <br><br>I agree, i do need those, as it would probably solve the problem, but, i dont know exactly how to go about it.  I do appreciate the suggestions on the fact the checks are needed, but the method of actually creating those checks as suggested above is what i dont understand.</div></blockquote>insert in your code in the appropriate place(s):<br><div class="codebox"><p>Code: </p><pre><code>if { ![botisop $chan] } { continue }if { [isvoice $nick $chan] } { continue }if { [isop $nick $chan] } { continue }</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=282">egghead</a> — Sun Jul 13, 2003 5:04 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[KnightHawk]]></name></author>
		<updated>2003-07-13T16:59:00-04:00</updated>

		<published>2003-07-13T16:59:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=23425#p23425</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=23425#p23425"/>
		<title type="html"><![CDATA[Autovoice script gets caught in loop for first channel]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=23425#p23425"><![CDATA[
I should also clarify the fact that the bots name is Talon.  The loop is indeed happening when the bot trys to voice it self, not when a norm users joins the chan.  If i restart ( not rehash) the bot, it only trys to voice itself, it doesnt try and voice people that already have one ( thanks god).<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3490">KnightHawk</a> — Sun Jul 13, 2003 4:59 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[KnightHawk]]></name></author>
		<updated>2003-07-13T16:56:07-04:00</updated>

		<published>2003-07-13T16:56:07-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=23424#p23424</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=23424#p23424"/>
		<title type="html"><![CDATA[Autovoice script gets caught in loop for first channel]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=23424#p23424"><![CDATA[
ok, Thank you for actually loading the script and trying it.  Perhaps i should correct something here.     <blockquote class="uncited"><div>Egghead wrote: "This is exactly what one would expect from your code: the bot joins the channel itself and sends out a +v for itself on *EACH* channel."  </div></blockquote>Correct, that is what i expect to happen, and i like it that way :0)     <blockquote class="uncited"><div>Egghead wrote:<br>So, if your bot is on 10 channels, and all those 10 channels are also defined in the voice_chans1 variable, there will be 10 * 10 = 100 "mode +v" sent out. </div></blockquote> Yes, that is what a person would expect to happen, but is not the case on mine.  If the bot resides on either 2 chans or 6, it still produces exatcly 17 (i recounted) messages.  The messages are always for the same channel, which is the first channel listed in the voice_chans1 list, regardless of the name of that chan.      <blockquote class="uncited"><div>Egghead wrote:<br>A bind join is for 1 channel only, so you need to send out one +v for that channel. </div></blockquote>  I was under the impression that bind *|* would tell it to bind to all channels     <blockquote class="uncited"><div>Egghead wrote:<br>Besides that you need to implement a couple of checks (as indicated previously), like: is the bot on the channel, does the nick to be voiced already have voice, has the bot ops.</div></blockquote> I agree, i do need those, as it would probably solve the problem, but, i dont know exactly how to go about it.  I do appreciate the suggestions on the fact the checks are needed, but the method of actually creating those checks as suggested above is what i dont understand.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3490">KnightHawk</a> — Sun Jul 13, 2003 4:56 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[egghead]]></name></author>
		<updated>2003-07-13T16:36:32-04:00</updated>

		<published>2003-07-13T16:36:32-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=23422#p23422</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=23422#p23422"/>
		<title type="html"><![CDATA[Autovoice script gets caught in loop for first channel]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=23422#p23422"><![CDATA[
<blockquote class="uncited"><div><blockquote class="uncited"><div>How many times did you .rehash your bot? Every time you do it, the script is reloaded and will voice the person another time. Try .restart and see if the problem still exists. Also, you should make sure the user is *on* those channels before you send the mode hehe. (Hint: use the "onchan" command.)</div></blockquote>Please re-read my original post.  This problem only happens when the bot is started, restarted.  and yes, The user is on THAT channel. As i said, it only happens to the first channel in the list of voice_chans1., and only after the bot is restarted.  Rehash doesnt cause the problem.  i can rehash all day long without any probs</div></blockquote>Ok, here is what I did.<br><br>step 1: load the below code on my bot:<br><div class="codebox"><p>Code: </p><pre><code>set voice_chans1 "#chan1 #chan2 #chan3" set voice_chans2 "#chan1 #chan2 #chan3" bind join *|* * join_autovoice proc join_autovoice {nick host hand chan} {    global voice_chans1 voice_chans2    foreach chan $voice_chans1 {       putlog "Putquick mode +v for $nick on $chan"   }    foreach chan $voice_chans2 {       putlog "Putquick mode +v for $nick on $chan"   } }</code></pre></div>Step 2: I joined the partyline of the bot.<br><br>Step 3: I typed .restart and observed the messages on the partyline.<br><br>Step 4. The bot reconnects and joins ONE channel (!) and putlogs the following lines:<br><blockquote class="uncited"><div>[16:28] Putquick mode +v for eggheadbot on #chan1<br>[16:28] Putquick mode +v for eggheadbot on #chan2<br>[16:28] Putquick mode +v for eggheadbot on #chan3<br>[16:28] Putquick mode +v for eggheadbot on #chan1<br>[16:28] Putquick mode +v for eggheadbot on #chan2<br>[16:28] Putquick mode +v for eggheadbot on #chan3</div></blockquote>This is exactly what one would expect from your code: the bot joins the channel itself and sends out a +v for itself on *EACH* of the channels defined in the variables voice_chans1 and voice_chans2. (note that my bot is only on *ONE* active channel, all other channels are set +inactive).<br><br>If the bot had 2 active channels and the bot joins them on a .restart, you would see the above 2 times i.e. 2 * 6 = 12 modes +v being pushed out. Because the bind join is triggered twice.<br><br>So, if your bot is on 10 channels, and all those 10 channels are also defined in the voice_chans1 variable, there will be 10 * 10 = 100 "mode +v" sent out. Because the bind join would be triggered 10 times, each trigger pushing out 10 +v's.<br><br>What your script is doing, is if a user joins one channel #chan1, it will send out a mode +v for *all* the channels defined in the voice_chans1 and voice_chans 2 variable.<br><br>It seems what you need is removing those loops. A bind join is for 1 channel only, so you need to send out one +v for that channel.<br>So, if a bind join is triggered you check if the chan is in the list of voice_chans1 and voice_chans2. The suggestion of caeser to use a user defined flag is even better.<br><br>Besides that you need to implement a couple of checks (as indicated previously), like: is the bot on the channel, does the nick to be voiced already have voice or ops, has the bot ops.<br><br>If you really want to have those loops in there, then the above tests will avoid the bot sending out so many +v's. Because upon the bot joining, a [botisop] will fail.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=282">egghead</a> — Sun Jul 13, 2003 4:36 pm</p><hr />
]]></content>
	</entry>
	</feed>
