Thread Tools Display Modes
Prev Previous Post   Next Post Next
09/30/14, 10:04 PM   #1
Argusus
AddOn Author - Click to view addons
Join Date: Sep 2014
Posts: 120
EVENT_CHAT_MESSAGE_CHANNEL Question

hello,

i'm using the EVENT_CHAT_MESSAGE_CHANNEL event to see if a friend is whispering me, it seems to be working properly but i'm friend that the message display even when its not a direct whisper and its even a "group chat" message to the group we are in. I'd only like to catch when someone whispers me directly rather than seeing the debug statement when the message is in group chat. any ideas?

Code:
function ChatMessageChannel(eventCode, messageType, fromName, text)

local pstPerson = zo_strformat(SI_UNIT_NAME, fromName)

if messageType == CHAT_CATEGORY_WHISPER_INCOMING and then
	d(pstPerson)
	if (IsFriend(pstPerson)) then
		d("A friend just whispered you")
	end 
end


end
  Reply With Quote
 

ESOUI » Developer Discussions » Lua/XML Help » EVENT_CHAT_MESSAGE_CHANNEL Question


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