| View previous topic :: View next topic |
| Author |
Message |
tuc0w Voice
Joined: 20 Feb 2012 Posts: 2
|
Posted: Mon Feb 20, 2012 2:03 pm Post subject: ! channel and chanlist |
|
|
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: | | 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 |
|
| Back to top |
|
 |
nml375 Revered One
Joined: 04 Aug 2006 Posts: 2857
|
Posted: Mon Feb 20, 2012 2:25 pm Post subject: |
|
|
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.
| Quote: | 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, idling at #eggdrop@IrcNET |
|
| Back to top |
|
 |
tuc0w Voice
Joined: 20 Feb 2012 Posts: 2
|
Posted: Mon Feb 20, 2012 2:37 pm Post subject: |
|
|
| Ahh dname, thanks! |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|