Lua Code:
local function ChatMessageChannel(messageType, fromName, text)
if messageType == CHAT_CHANNEL_WHISPER then
-- Don't zo_strformat UserId's
local pstPerson
if string.find(from, "@") == nil then
pstPerson = zo_strformat(SI_UNIT_NAME, fromName)
end
d(pstPerson)
if (IsFriend(pstPerson)) then
d("A friend just whispered you")
end
end
end
ZO_ChatSystem_AddEventHandler(EVENT_CHAT_MESSAGE_CHANNEL, ChatMessageChannel)
I didn't checked it, but it should work as intended, no?