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.

! channel and chanlist

Help for those learning Tcl or writing their own scripts.
Post Reply
t
tuc0w
Voice
Posts: 2
Joined: Mon Feb 20, 2012 1:54 pm

! channel and chanlist

Post by tuc0w »

Hey people,

we recently had to change our IRC channel from a normal # channel to a ! channel. Since we did this I had to adjust most of our tcl scripts. Everything went good till I had to use the chanlist command again.

Code: Select all

Tcl error [count]: invalid channel: !9ZLTBtest
I'm getting this error all the time I call my count proc. I already tried to escape it with \!9ZLTBtest like it works in other commands but I didn't find anything that works.


Does anyone got an idea how to manage this?



Best regards
tuc0w
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

You'll have to use the descriptive name (!test), not the real name (!9LZTBtext) with eggdrop's internal commands. For convenience, you can use the channame2dname and dchanname2name functions to convert between the two.
channame2dname <channel-name>
chandname2name <channel-dname>
Description: these two functions are important to correctly support !channels. The bot differentiates between channel description names (chan dnames) and real channel names (chan names). The chan dnames are what you would normally call the channel, such as "!channel". The chan names are what the IRC server uses to identify the channel. They consist of the chan dname prefixed with an ID; such as "!ABCDEchannel".

For bot functions like isop, isvoice, etc. you need to know the chan dnames. If you communicate with the server, you usually get the chan name, though. That's what you need the channame2dname function for. If you only have the chan dname and want to directly send raw server commands, use the chandname2name command.

NOTE: For non-!channels, chan dname and chan name are the same.

Module: irc
NML_375
t
tuc0w
Voice
Posts: 2
Joined: Mon Feb 20, 2012 1:54 pm

Post by tuc0w »

Ahh dname, thanks!
Post Reply