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

	<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-12-11T13:28:29-04:00</updated>

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

		<entry>
		<author><name><![CDATA[willyw]]></name></author>
		<updated>2015-12-11T13:28:29-04:00</updated>

		<published>2015-12-11T13:28:29-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=104596#p104596</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=104596#p104596"/>
		<title type="html"><![CDATA[Scan Channel list]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=104596#p104596"><![CDATA[
<blockquote class="uncited"><div>Bot's name is always first, or at least is should be.</div></blockquote>That's interesting.<br><br>Why?<br><blockquote class="uncited"><div>Anyway, if you want to be 100% sure about removing it from the right position then proceed with:<div class="codebox"><p>Code: </p><pre><code>set userList [chanlist #somechannel]set pos [lsearch -nocase $userList $::botnick]set userList [lreplace $userList $pos $pos]</code></pre></div>and continue with the <em class="text-italics">foreach</em> loop.</div></blockquote>Yep.   <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10420">willyw</a> — Fri Dec 11, 2015 1:28 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2015-12-11T11:22:36-04:00</updated>

		<published>2015-12-11T11:22:36-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=104595#p104595</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=104595#p104595"/>
		<title type="html"><![CDATA[Scan Channel list]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=104595#p104595"><![CDATA[
Bot's name is always first, or at least is should be.<blockquote class="uncited"><div>.tcl chanlist #eggdrop<br>Tcl: Bot Pixelz jack3 RockKeyman CRaby Stephe nrt r00tb0y Guest67864 poptix Granis` Lillypad simple Rothgar Broney Freeder_ Kamran vigilant CyBex niko_ KuNgFo0_ sid3windr add_ Biagio zeveroare FireEgl SpiKe^^ thekidd DrPepper SoulesSs Robby thommey Ratler Spike Ritche</div></blockquote>Anyway, if you want to be 100% sure about removing it from the right position then proceed with:<div class="codebox"><p>Code: </p><pre><code>set userList [chanlist #somechannel]set pos [lsearch -nocase $userList $::botnick]set userList [lreplace $userList $pos $pos]</code></pre></div>and continue with the <em class="text-italics">foreach</em> loop.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Fri Dec 11, 2015 11:22 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[SpiKe^^]]></name></author>
		<updated>2015-12-09T19:04:03-04:00</updated>

		<published>2015-12-09T19:04:03-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=104593#p104593</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=104593#p104593"/>
		<title type="html"><![CDATA[Scan Channel list]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=104593#p104593"><![CDATA[
<blockquote class="uncited"><div>What if bot's nick is not the first one in the list returned by chanlist ?</div></blockquote>Yes, I checked the chanlist return and there is no way to tell where the bots nick will be in that return...<br><blockquote class="uncited"><div>[17:11] &lt;SpiKe^^&gt; ;chanlist #pc-mirc-help<br>[17:11] &lt;Morticia&gt; SpiKe^^: #266 (14 clicks) Tcl: Bogustrivia bogustrivia^ Morticia RayMond kingkong Robby Howitzer SpiKe^^ ZoRoCaShE starr Starr`</div></blockquote><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7749">SpiKe^^</a> — Wed Dec 09, 2015 7:04 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[willyw]]></name></author>
		<updated>2015-12-09T10:22:29-04:00</updated>

		<published>2015-12-09T10:22:29-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=104591#p104591</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=104591#p104591"/>
		<title type="html"><![CDATA[Scan Channel list]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=104591#p104591"><![CDATA[
What if bot's nick is not the first one in the list returned by chanlist ?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10420">willyw</a> — Wed Dec 09, 2015 10:22 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2015-12-09T10:14:19-04:00</updated>

		<published>2015-12-09T10:14:19-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=104590#p104590</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=104590#p104590"/>
		<title type="html"><![CDATA[Scan Channel list]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=104590#p104590"><![CDATA[
In case you wish to exclude bot from the list you got two options:<br><br>1. Inside the <em class="text-italics">foreach</em> loop add a <em class="text-italics">continue</em> instruction if the nick matches bot's name by using the built-in <em class="text-italics">isbotnick</em> function like this:<div class="codebox"><p>Code: </p><pre><code>foreach nick [chanlist #somechannel] {if {[isbotnick $nick]} continue}</code></pre></div>2. Or better, just exclude it right away when creating the list:<div class="codebox"><p>Code: </p><pre><code>set userList [lreplace [chanlist #somechannel] 0 0]foreach nick [split $userList] {# do something with each nick in the channel}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Wed Dec 09, 2015 10:14 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[maphex]]></name></author>
		<updated>2015-12-08T21:00:56-04:00</updated>

		<published>2015-12-08T21:00:56-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=104589#p104589</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=104589#p104589"/>
		<title type="html"><![CDATA[Scan Channel list]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=104589#p104589"><![CDATA[
Worked great thanks SpiKe^^<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11913">maphex</a> — Tue Dec 08, 2015 9:00 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[SpiKe^^]]></name></author>
		<updated>2015-12-08T19:15:56-04:00</updated>

		<published>2015-12-08T19:15:56-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=104588#p104588</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=104588#p104588"/>
		<title type="html"><![CDATA[Scan Channel list]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=104588#p104588"><![CDATA[
In tcl, foreach works on tcl lists, not arrays of variables like some other languages...<div class="codebox"><p>Code: </p><pre><code>foreach nick [chanlist #somechannel] {  ## do something with each nick in the channel ##}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7749">SpiKe^^</a> — Tue Dec 08, 2015 7:15 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[maphex]]></name></author>
		<updated>2015-12-08T18:50:19-04:00</updated>

		<published>2015-12-08T18:50:19-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=104587#p104587</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=104587#p104587"/>
		<title type="html"><![CDATA[Scan Channel list]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=104587#p104587"><![CDATA[
I already have a script i'm working but part of the puzzle that i cant figure out how to do is i'm using bind cron to run the proc every so often but i want it to scan the channel list and save each user as a variable probable use a foreach and use the variable in the rest of the proc. If anyone can show me the best way yo do this would be great.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11913">maphex</a> — Tue Dec 08, 2015 6:50 pm</p><hr />
]]></content>
	</entry>
	</feed>
