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.

channellist

Old posts that have not been replied to for several years.
Locked
b
bigmo

channellist

Post by bigmo »

hi@ll..
an other simple question *g*
how can i get a list of all channels my bot is in?
and what status it has (+v/+o) ..
thx4help
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

All this information is availabel in tcl-commands.doc

Look up channel and isop, isvoice and so on.

Please try and read the documentation before posting.
b
bigmo

Post by bigmo »

yo..thx..i'll remember next time
b
bigmo

Post by bigmo »

hm..
i got my channellist now.. but i got also channels with a eg. "]" in it.. so the channellist looks like "#my2stchan #my2sndchan {#my][3rdchan}"
how can just get the channame w/o the "{}" bc it is no real chan i'm not able to get my userstatus :(
thx1more4help
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

As with many of the Tcl commands in eggdrop, this command returns a Tcl list.

Lists, in a simple form, are arrays encapsulated in a string.

WHat you to watch out for, ios that you use list commands on lists, and string command on strings, and not to mix the commands.

You can convert between list to string with the join command, and string to list with the split command.

Howver, to correctly obtain a item from a list, use the lindex command.
b
bigmo

Post by bigmo »

ahh..
i just tried to split it with [split " "]
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

Do not use split on a list. Split should only be used on a string.

This can cause all sorts of issues, that may not rear themselves till the furture, but will haunt you.

As it returns a list, you can use list commands straight off. You could possibly use join to create a string from the list, but my guess is you need it as a list.
Locked