stammer Voice
Joined: 10 Mar 2003 Posts: 31 Location: Bulgaria
|
Posted: Wed May 21, 2003 7:53 am Post subject: rand command |
|
|
hi there,
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:
| Code: | set chanlist [chanlist $chan -T]
if {[llength $chanlist]>2} {
set rndnick $nick
set 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]
}
|
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.
Is this is mistake in my tcl or it's bug in the windrop/eggdrop?
10x |
|