egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

! channel and chanlist

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
tuc0w
Voice


Joined: 20 Feb 2012
Posts: 2

PostPosted: Mon Feb 20, 2012 2:03 pm    Post subject: ! channel and chanlist Reply with quote

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
View user's profile Send private message
nml375
Revered One


Joined: 04 Aug 2006
Posts: 2857

PostPosted: Mon Feb 20, 2012 2:25 pm    Post subject: Reply with quote

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
View user's profile Send private message
tuc0w
Voice


Joined: 20 Feb 2012
Posts: 2

PostPosted: Mon Feb 20, 2012 2:37 pm    Post subject: Reply with quote

Ahh dname, thanks!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
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


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber