Thread Tools Display Modes
Prev Previous Post   Next Post Next
03/29/21, 01:33 PM   #1
AuthenticGlitch
Join Date: Mar 2021
Posts: 2
Intercept Chat Messages

I know addons like pChat can filter out spam messages in zone chat and I'm curious how to go about doing this for my own addon. From my research I know I can add a function to the EVENT_CHAT_MESSAGE_CHANNEL but I would assume this does not actually intercept the message it just lets you see what the message is and do something with the information provided, or am I wrong?

For example, would the following code prevent whispers from appearing if I'm in a group instance? This is not exactly what I want to do, its just an example so I can understand things better.
Code:
OnChatMessage(eventCode, channelType, senderAcc, message, isCustomerSevice, senderName)
	if channelType == CHAT_CATEGORY_WHISPER_INCOMING then
		if IsInGroupInstance() then return end
	end
end
Now, if I'm correct and this does not intercept the message how would I go about ensuring specific message from this event does not make it through to the chat window?

Thanks for any help you can provide.
  Reply With Quote
 

ESOUI » Developer Discussions » General Authoring Discussion » Intercept Chat Messages


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