Thread Tools Display Modes
03-26-13, 07:34 AM   #1
shalom69
A Fallenroot Satyr
Join Date: Feb 2013
Posts: 22
How to view CHAT_MSG_ADDON

Is there a mod or a method to simply see the CHAT_MSG_ADDON my code is generating?

Thanks in advance.
  Reply With Quote
03-26-13, 07:53 AM   #2
Haleth
This Space For Rent
 
Haleth's Avatar
Featured
Join Date: Sep 2008
Posts: 1,173
Messages are received via the CHAT_MSG_ADDON event. The client utilizes the prefix string to filter messages; only those prefixes which have been registered will be received. Prefixes can be registered using RegisterAddonMessagePrefix.
http://wowprogramming.com/docs/api/SendAddonMessage

So you'd have to call RegisterAddonMessagePrefix using the prefix you're sending your messages with, then register CHAT_MSG_ADDON.

I hope this helps!
  Reply With Quote
03-26-13, 08:00 AM   #3
shalom69
A Fallenroot Satyr
Join Date: Feb 2013
Posts: 22
hey what's up Haleth

I registered the prefix so my addon is getting the messages but they are not sent to my chat window. I wanted to monitor the actual messages to check a few things. Is there a way to print the messages to view them?
  Reply With Quote
03-26-13, 08:02 AM   #4
Dridzt
A Pyroguard Emberseer
 
Dridzt's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2005
Posts: 1,360
Spydon or a similar addon.
  Reply With Quote
03-26-13, 08:05 AM   #5
Haleth
This Space For Rent
 
Haleth's Avatar
Featured
Join Date: Sep 2008
Posts: 1,173
In your OnEvent function, you can simply pass the 'message' argument to print() or something else so you can see the output.

Assuming that's what you mean.
  Reply With Quote
03-26-13, 08:15 AM   #6
shalom69
A Fallenroot Satyr
Join Date: Feb 2013
Posts: 22
alright thanks for the replies guys
  Reply With Quote
03-27-13, 04:44 AM   #7
shalom69
A Fallenroot Satyr
Join Date: Feb 2013
Posts: 22
To follow up on this, can someone tell me what the throttle threshold on SendAddonMessage is? Since making some changes I'm getting disconnected and I think it may be an issue with the number of messages I'm sending between 2 running instances of WOW.

As always thanks in advance for the replies.
  Reply With Quote
03-27-13, 07:28 AM   #8
Torhal
A Pyroguard Emberseer
 
Torhal's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2008
Posts: 1,196
Most AddOns use ChatThrottleLib (it's here on WoWInterface as well, but hasn't been updated in two years) to handle this issue.
__________________
Whenever someone says "pls" because it's shorter than "please", I say "no" because it's shorter than "yes".

Author of NPCScan and many other AddOns.
  Reply With Quote

WoWInterface » Developer Discussions » General Authoring Discussion » How to view CHAT_MSG_ADDON


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

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