View Single Post
11-17-10, 09:42 AM   #12
Xubera
A Cobalt Mageweaver
 
Xubera's Avatar
AddOn Author - Click to view addons
Join Date: May 2009
Posts: 207
well the main concept behind this is that "new" is actually now SendChatMessage() so "new" takes 4 parameteres.

Message, chatType, language, and channel

i made an error in judgement when i named my variable channel, i switched the two around in my head when iwrote that last night. either way its important to know that "channel" in the above code accepts the 2nd parameter "chatType"


when the snippet was originally written, we were never gonna use the last 3 parameters, so the vararg (...) was used, we could also write it like this

Code:
local new = function(message, chatType, ...)
        if chatType == "GUILD" or chatType == "SAY" or chatType == "YELL" then
	    if message:len() > 0 and not message:match("^/") then
		    message = message:replace("r", "rr"):replace("rrrr", "rr"):replace("R" "RR"):replace("RRRR", "RR")
	    end
        end
	old(message, chatType, ...)
end
__________________
Chat Consolidate is the solution to any out of control trade chat. Ignore lines, throttle chat, consolidate posts!Follow the link to find out how!

▲ ▲ WoWInterface wont let me triforce >.>
  Reply With Quote