Thursday, April 12, 2012

hide outgoing whisper

[:1]Hey, I'm working with NinjaInvite to invite new members to my guild. Only I just want it to send messages and not instantly invite them. So after changing the settings my whole chatbox got spammed with outgoing whispers. To stop this I added a function to the code which I found with google, but it does not seem to work. All information I find said it should be done like this, how can I fix this?

(oh, I do get the message it sends in the function)


Code:
local frame, events = CreateFrame"Frame", {} -- this line is original code not written by me
frame:RegisterEvent("CHAT_MSG_WHISPER_INFORM");

function events:CHAT_MSG_WHISPER_INFORM(msg, sender, language, channelString, target)
if string.find(msg,Ni_Settings.msg) then
NinjaMessage("Send a whisper to " .. target)
return -- also tried 'return true'
end
end

No comments:

Post a Comment