View Single Post
05/31/21, 11:44 PM   #3
siruker
Join Date: May 2021
Posts: 4
Originally Posted by Baertram View Post
Check the MANY existing addons that filter chat messages or suppress chat spam and advertisements, e.g.:
https://www.esoui.com/downloads/info...sSpamMore.html
https://www.esoui.com/downloads/info...ementSpam.html
https://www.esoui.com/downloads/info...hatFilter.html

Important:
If you use CHAT_ROUTER and add a prehook, or register a function for "FormatAndAddChatMessage":

Be aware that registering some chat handlers will overwrite other addon's chat handlers! Currently you can only register 1 message handler to the chat messages so writing an addon which does this might destroy other chat addons like pChat/rChat etc.
If you preHook, like Cyrillic Chat Filter dies, the function "FormatAndAddChatMessage" be sure to make your addon dependend on those public addons so that the other addons load first (by using ## OptionalDependsOn: pChat rChat) AND by registering your stuff at EVENT_PLAYER_ACTIVATED instead of EVENT_ADD_ON_LOADED (as pChat/rChat start to register their addon chat functions there!) AND test if your addon breaks the other addons and say so in your description.
Also test if this destroys the chat history of the other addons as they might store the chat message that you have blocked/deleted already somewhere internally and after that you delete the message -> indices are f**ed up!

Thank you
Will do tnx.
  Reply With Quote