View Single Post
10/15/14, 02:21 PM   #11
Argusus
AddOn Author - Click to view addons
Join Date: Sep 2014
Posts: 120
Originally Posted by Garkin View Post
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:
  1. local function ChatMessageChannel(eventCode, messageType, fromName, text, isFromCustomerService)
  2.     if messageType == CHAT_CHANNEL_WHISPER then
  3.         fromName = IsDecoratedDisplayName(fromName) and fromName or zo_strformat(SI_UNIT_NAME, fromName)
  4.         d(fromName)
  5.         if IsFriend(fromName) then
  6.             d("A friend just whispered you")
  7.         end
  8.     end
  9. end
  10.      
  11. 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?
  Reply With Quote