You can check if the event is CHAT_MSG_SAY or CHAT_MSG_GUILD (or something else) using the 'event' parameter.
Mind you, what you are doing is not a good idea. The way it is now, -everyone- running your addon will respond to this query - that can get quite spammy. You should allow people running the addon to send the info manually instead, or simply only register whispers.
Last edited by Haleth : 07-09-12 at 02:49 PM.
|