1. Is there a way to hide an out going chat whisper sent from an addon?

    I've written an addon that sends out several identical whispers to a group of people and I'd like to avoid having my chat frame plastered with all the out going messages. I just want to see incoming whispers...

    Also is there a way to avoid the whisper limit blizz has... I've hit it a time or two and lost some messages.

    You can add a message filter using ChatFrame_AddMessageEventFilter. As for the whisper limit, I'm not sure what you're talking about.

    A couple of times I got a message in place of whispers saying... " to many whispers sent"... It appears to be an anti spam method that blizz has in place to stop the gold sellers from spamming a whole server.

    Then no, there's no way to bypass that. But why are you sending hidden whispers in the first place? Why not just use the SendAddonMessage function, which is designed for addon communication?

    I'm not doing an addon to addon communication. The whisper are a guild recruiting message. :-)

    The addon does a who for say level 1-5 and then filters out those that don't have a guild and sends them a recruiting whisper. It works a lot better than spamming trade or guild recruiting channels. I still need to add a black list to keep track of who I have already sent the message to so I don't spam the same people.

    I have the outgoing whisper hidden sorta... I cant seem to get it to just hide the addons... its hiding all outgoing...

      I get this error. 
     ------------------------------------------------------------------------------------------
     2x recruiter-40000\recruiter.lua:52: bad argument #1 to 'find' (string expected, got nil)
     recruiter-40000\recruiter.lua:52: in function `filterFunc'
     Interface\FrameXML\ChatFrame.lua:2735: in function `ChatFrame_MessageEventHandler':
     Interface\FrameXML\ChatFrame.lua:2550: in function `ChatFrame_OnEvent':
     <string>:"*:OnEvent":1: in function <[string "*:OnEvent"]:1>
    
     Locals:
    
     ---------------------------------------------------------------------------------------------
    
     The code for it is ...
    
          local function HideOutgoing()
            if string.find(arg1,"[RavenGuard]") then
                print ("Out going whisper blocked");
                return true
            end
          end
          ChatFrame_AddMessageEventFilter("CHAT_MSG_WHISPER_INFORM", HideOutgoing)
    

    Because your arg1 is nil. You're trying to use global arguments and that won't work. You need to pass the arguments to your event handler (which I cannot see the origin of). As for getting around the whisper limit, no, you're spamming so the limit is there for a reason.

    You can instead spread the messages you are sending out over a period of time, if that's what you want to do.

    Yea... spreading the messages out would be just fine. I haven't been able to find a decent "sleep" or wait option to put a delay into the sending loop though.

    kk.. I'll figure out what my malfunction is on that arg1... thanks!

    Ok... Updated my code to this...

     local function HideOutgoing(self, event, msg, author, ...)
        if string.find(msg,"%[RavenGuard%]") then
            -- print ("Out going whisper blocked - "..msg);
            return true
        end
     end
     ChatFrame_AddMessageEventFilter("CHAT_MSG_WHISPER_INFORM", HideOutgoing)
    

    This seems to work perfectly...

    I still haven't found a method to slow down my whispers though...

    Use an OnUpdate timer and throttle your sends.

    Took me awhile to figure out the OnUpdate events. But eventually I got it figured out... I have broken my addon up now with 2 timers... a 5 second delay between out going whispers... and a 10 second delay on doing a who send... I also broke my who's apart so that they are done 1 level at a time... so I can tell the addon to do level 1-20 and it will do them 1 level at a time 10 seconds apart... adding the results to a table as a queue. The queue is then processed for the outgoing whispers ever 5 seconds... it sends out the last name in the queue then removes the last name. Works great...

    Now I think the last part I need to do to avoid spamming people on the server is to add two saved variables, One table for a black list and a second for already messaged people.

    Could you point me to where in the book you start working with saved variables... I seem to be missing it.

    Thanks.

    Chapter 13, Storing Data with SavedVariables. Page 251.

    AHhh... there it is... thank you!