Go Back   WowAce Forums > Addon Chat > Frameworks > Ace3
Ace3 Ace3 framework discussion

Reply
 
Thread Tools
Old 09-26-2011   #1
mgaiser
Member
 
Join Date: Jul 2008
Posts: 19
Default AceComm channel passwords?

So I want to use AceComm, and its "RegisterComm" function but I have a few questions.

JoinChannelByName allows you to pass a password so your channel has some amount of security. Does RegisterComm have any similar functionality? Do I lose any functionality by using JoinChannelByName instead of RegisterComm?
mgaiser is offline   Reply With Quote
Old 09-26-2011   #2
Adirelle
Legendary Member
 
Adirelle's Avatar
 
Join Date: Dec 2006
Posts: 2,383
Default Re: AceComm channel passwords?

AceComm uses addon channels (i.e.SendAddonMessage). You can only send messages to one of these channels : "PARTY", "RAID", "BATTLEGROUND", "GUILD", and "WHISPER" (+target name). There is no such thing as custom channels for AceComm. You do not need to register. AceComm automatically escapes messages, splits them and throttles the output rate if necessary. On the receiving side, it automatically reassembles split messages and unescapes them.

JoinChannelByName is intended for humans, not addons. Addons used to use them before addon channels were added. There is some drawbacks to using them for addons channels. Firstly, you have to hide the messages by hooking the chat functions. People without the addon will see these messages anyway (e.g. the addon registered the channel and the user uninstalls/disables it at next login). Considering the messages themselves, some special characters must be escaped. Moreover, some garbage is added to the messages whenever the character is drunk, you will have to escape more characters and removes some potential garbage. If you decided to go this way, I strongly advise you to use at least ChatThrottleLib so not to exceed the global output rate limit.
__________________
Author of Inline Aura, AdiBags, Squire2 and several other addons.

Each time you hit your "copy" command with a block of code, think about a way to refactor it so it did what you want without using the "paste" command.

Last edited by Adirelle; 09-26-2011 at 12:13 PM. Reason: spelling
Adirelle is offline   Reply With Quote
Old 09-26-2011   #3
mgaiser
Member
 
Join Date: Jul 2008
Posts: 19
Default Re: AceComm channel passwords?

Cool. Thanks for the clarification. Also, is there an UnRegisterComm function that I can use to stop listening for a certain channel?
mgaiser is offline   Reply With Quote
Old 09-26-2011   #4
Adirelle
Legendary Member
 
Adirelle's Avatar
 
Join Date: Dec 2006
Posts: 2,383
Default Re: AceComm channel passwords?

There are both :UnregisterComm("prefix") and :UnregisterAllComm() methods, though they are not documented on the AceComm-3.0 API page. Note that :UnregisterAllComm() is also automatically called on disable if you embed AceComm-3.0 as a library using AceAddon-3.0.
__________________
Author of Inline Aura, AdiBags, Squire2 and several other addons.

Each time you hit your "copy" command with a block of code, think about a way to refactor it so it did what you want without using the "paste" command.
Adirelle is offline   Reply With Quote
Reply

Tags
acecomm


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 12:21 AM.