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

	<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-05-21T07:53:28-04:00</updated>

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

		<entry>
		<author><name><![CDATA[stammer]]></name></author>
		<updated>2003-05-21T07:53:28-04:00</updated>

		<published>2003-05-21T07:53:28-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=20473#p20473</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=20473#p20473"/>
		<title type="html"><![CDATA[rand command]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=20473#p20473"><![CDATA[
hi there,<br><br>when i upgrade my windrop to 6.15 it seems one of my tcl's start to behave strange. I figure that it's in that fragment of code:<br><div class="codebox"><p>Code: </p><pre><code>set chanlist [chanlist $chan -T]if {[llength $chanlist]&gt;2} {set rndnick $nickset strs [lindex $nanypa [rand [llength $nanypa]]] while {($rndnick==$nick)||($rndnick==$botnick)} { set idx [rand [llength $chanlist]] set rndnick [lindex $chanlist $idx] set chanlist [lreplace $chanlist $idx $idx] }set strs [string map [list "NiCk" $rndnick] $strs]}</code></pre></div>the problem is - bot uses 'rand' command to choose random nickname in channel. In 6.13 this worked ok but after upgrading to 6.15 'rand' start to choose only one nick every time.<br><br>Is this is mistake in my tcl or it's bug in the windrop/eggdrop?<br><br>10x<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2835">stammer</a> — Wed May 21, 2003 7:53 am</p><hr />
]]></content>
	</entry>
	</feed>
