.lua
Code:
local cf = CreateFrame("FRAME", "MParent");
local frame = CreateFrame("FRAME", "MParent");
cf:RegisterEvent("CHAT_MSG_WHISPER");
frame:RegisterEvent("CHAT_MSG_CHANNEL_JOIN");
local function autoResponse(first,second,third,player,fifth,sixth,seventh,eight,nine,ten,eleven)
if player == "Carth" then
print(player .. "Is a fag")
elseif eleven == "OOC" then
print("|CFF00FF00" .. player .. " has entered the channel.|R");
SendChatMessage("Welcome to Ravenguard WoW OOC, " .. player .. ". It is Tuesday, March 10, 2010. The guild of the day is Omega. Have a good day! Also, check out the forums for a new Custom Class contest." ,"WHISPER" , nil,player);
end
end
local function commandHandler(empty,fag,message)
print("Event Fired.");
if message == "$unsubscribe" then
print("The user would like to unsubscribe.");
end
end
cf:SetScript("OnEvent",commandHandler);
frame:SetScript("OnEvent",autoResponse);
This is my currect code so far. Now, as you can see, it will automatically whisper a player when joining a channel: In this example, the channel is named OOC. Now, I want to make an '$unsubscribe' command, so when people whisper me it, it will not whisper that character on joining. So far, I don`t know how to do this. I also need to make the list live when I logout, how do I do this?