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