This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

When the bot reaches 20 channels, it parts one? How? :)

Old posts that have not been replied to for several years.
Locked
User avatar
Tristam
Voice
Posts: 17
Joined: Sun Sep 21, 2003 11:28 am
Location: Finland

When the bot reaches 20 channels, it parts one? How? :)

Post by Tristam »

Hello! I have to make a script which parts the bot from a specific channel when the bot has joined 20 channels, and makes it join the same channel again, when some other channel is parted.. But I have no idea where to start from :) Any ideas how to even check how many channels the bot is on, and write it into a variable for example?
Tristam - tristam@iki.fi
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

To get the number of on how many channels the bot sits use [llength [channels]]. Then to get an random channel to be parted (make it +inactive and remove it when you want it back there) use something like: set randchan [lindex [channels] [rand [llength [channels]]]] and do your stuff with it.
Once the game is over, the king and the pawn go back in the same box.
Locked