• 0

    posted a message on Surpress outgoing addon whispers

    I'm new to this forum, but had no clue where else to ask this so here goes:

    I've made an addon for my raidforce to use; it catches incoming whispers and replies automatically to the whisperer. For example someone whispers me 'elysiumdkp conqueror', the addon replies '[elysium] Felsir has priority for the next conquerer token'. The addon works; I can catch the incoming whispers and reply accordingly.
    However: I don't want to see the outgoing whispers. So this is what I tried:

    local function HideOutgoing()
       if string.find(arg1,"[elysium]") then 
          return true
    ChatFrame_AddMessageEventFilter("CHAT_MSG_WHISPER_INFORM", HideOutgoing)

    Something is wrong; it block all outgoing whispers, not just the ones that start with [elysium]. as you can see in the code, I try to react only to the whispers that have [elysium] in them.
    So how do I fix it so it only blocks the ones that are created by the addon?
    Posted in: Lua Code Discussion
  • To post a comment, please or register a new account.