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.

Listing all the channels the bot is on

Old posts that have not been replied to for several years.
Locked
User avatar
z_one
Master
Posts: 269
Joined: Mon Jan 14, 2002 8:00 pm
Location: Canada

Post by z_one »

How can I return a list of all the channels the bot is on (not only those that are defined in the config. file but all the chans the bot is on) ?

The command "channels" returns the list of the channels the bot is monitoring (or trying to). Meaning channels that are defined in the bot's configuration file only.

If I make the bot join a channel by using .+chan <chan_name> then that channel will not be included in the list returned by the command "channels" and so I am getting an error in my script.
W
Wcc
Master
Posts: 278
Joined: Sun Oct 28, 2001 8:00 pm
Location: USA
Contact:

Post by Wcc »

You can view the channels by using .status.
If you mean a Tcl command, 'channels' is the correct command, you just need to do a botonchan check to see if the bot is actually on the channel.
P
Petersen
Owner
Posts: 685
Joined: Thu Sep 27, 2001 8:00 pm
Location: Blackpool, UK

Post by Petersen »

yah, something like
proc onchannels {} {
set onchans ""
foreach i [channels] {
if {[botison $i]} {lappend onchans $i}
}
return $onchans
}
the this will make the command 'onchannels' return a list in the same format as 'channels'

another way would be to ask the server what channels you're on (ie, send a WHOIS $botnick and capture the reply)
Locked