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.

Check if bot i on channel

Old posts that have not been replied to for several years.
Locked
P
ProXy
Op
Posts: 126
Joined: Sun Aug 11, 2002 3:09 pm

Check if bot i on channel

Post by ProXy »

Hi there, I want to check if my eggdrop is on a given channel. But whenever I try [onchan $botnick $chan] it returns an error, because the eggdrop checks this before he runs the script. Is there another possibility to check if the eggdrop is on a channel?
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

botonchan [channel]
Returns: 1 if the bot is on the specified channel (or any channel if
no channel is specified); 0 otherwise
Once the game is over, the king and the pawn go back in the same box.
P
ProXy
Op
Posts: 126
Joined: Sun Aug 11, 2002 3:09 pm

Post by ProXy »

Even if i check with botonchan $channel, I get this error message:
Tcl error [pub:channel]: illegal channel: #ddrb
Is there another way to check, if the eggdrop is on a channel?
User avatar
Papillon
Owner
Posts: 724
Joined: Fri Feb 15, 2002 8:00 pm
Location: *.no

Post by Papillon »

first you have to check if the bot is even supposed t monitor that channel...

channels
returns: list of the channels the bot is monitoring (or trying to)

validchan <channel>
checks if the bot is monitoring that channel
returns: 1 if the channel exists, 0 if not

suggestion... read the tcl-commands.doc <-- the answer to alot of answers asked in this forum are in there... just seems like people don't bother reading it.. :-?
Last edited by Papillon on Sun Jan 12, 2003 9:01 am, edited 1 time in total.
Elen sila lúmenn' omentielvo
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

First, use the "validchan" comand, to test if the channel is being monitored by eggdrop (doesn't mean it's actualy ont he channel).

If this returns 1, then you can do a "botonchan" test
Locked