Thread Tools Display Modes
01-08-16, 07:33 PM   #1
SlashdotXxX
A Murloc Raider
Join Date: Jan 2016
Posts: 4
Question Addon that whisper welcome message to new raid members.

Hello.

I wonder if there some Addon out there that could manage that when I invite someone to the raid via the LFR tool(I'm the Raidleader building my own HFC Heroic Raid @Archimonde for example) they should get a whisper from me saying "Welcome to this evenings raid, I want to inform you that $[ITEM] from Archimonde are reserved."

The reason I want this is because many times ppl miss the note in the LFR channel, and I wanna prevent any sad members of the raid.

Regards/Slashdotxx
  Reply With Quote
01-12-16, 06:33 AM   #2
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Well, I'm not sure your idea would actually solve the problem (people who don't read the LFM message before asking for an invite aren't much more likely to read a whisper), but it wouldn't be difficult to implement:

Code:
local MESSAGE

local pattern = gsub(ERR_RAID_MEMBER_ADDED_S, "%%s", "(.+)")

local frame = CreateFrame("Frame")
frame:RegisterEvent("CHAT_MSG_SYSTEM")
frame:SetScript("OnEvent", function(self, event, message)
    if not MESSAGE then return end

    local whoJoined = strmatch(message, pattern)
    if not whoJoined then return end
    
    SendChatMessage(MESSAGE, "WHISPER", nil, whoJoined)
end)

SlashCmdList.MSG_ON_RAID_JOIN = function(message)
    message = message and string.trim(message) or ""
    if strlower(message) == "off" then
        MESSAGE = nil
        print(NORMAL_FONT_COLOR_CODE .. "MsgOnRaidJoin:|r Auto-message is now disabled.")
    elseif strlen(message) > 0 then
        MESSAGE = message
        print(NORMAL_FONT_COLOR_CODE .. "MsgOnRaidJoin:|r Auto-message is now:")
        print("    " .. MESSAGE)
    elseif MESSAGE then
        print(NORMAL_FONT_COLOR_CODE .. "MsgOnRaidJoin:|r Auto-message is currently:")
        print("    " .. MESSAGE)
    else
        print(NORMAL_FONT_COLOR_CODE .. "MsgOnRaidJoin:|r Auto-message is currently disabled.")
    end
end

SLASH_MSG_ON_RAID_JOIN1 = "/mrj"
Set the message:
/mrj Welcome to this evenings raid, I want to inform you that $[ITEM] from Archimonde are reserved.

Clear the message:
/mrj off

Get the current message state:
/mrj

The message is not saved between login sessions, and the default state is "off" until you set a message for the current session.

You can use http://addon.bool.no/ to turn the above code into an addon.
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.

Last edited by Phanx : 01-17-16 at 06:53 PM. Reason: Fix missing closing quote
  Reply With Quote
01-13-16, 12:07 PM   #3
SlashdotXxX
A Murloc Raider
Join Date: Jan 2016
Posts: 4
Excellent, will take it for a testdrive, I needed to close one of the lines properly there but I understod that myself.
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Search/Requests » Addon that whisper welcome message to new raid members.

Thread Tools
Display Modes

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