Originally Posted by Garkin
If messages are correcly displayed in the chat, there must be something wrong in your code (like single = instead of double == in the condtion). Chat doesn't use anything else then messageType.
Lua Code:
local function ChatMessageChannel(eventCode, messageType, fromName, text, isFromCustomerService) if messageType == CHAT_CHANNEL_WHISPER then fromName = IsDecoratedDisplayName(fromName) and fromName or zo_strformat(SI_UNIT_NAME, fromName) d(fromName) if IsFriend(fromName) then d("A friend just whispered you") end end end EVENT_MANAGER:RegisterForEvent("MyAddonName", EVENT_CHAT_MESSAGE_CHANNEL, ChatMessageChannel)
Message types are listed here: http://wiki.esoui.com/Globals#MsgChannelType
|
Sorry Garkin, one more thing. I was wondering if you have tried this and see if a plain message in a group chat displays the whisper message when you send a message or someone else does in the group channel rather than the whisper channel?