This addon will color your outbound chat messages. It will not affect GM commands. I wrote this in 2.3, I am releasing it because of this post.
If you don't like it, don't post as I really don't care. Constructive criticism is fine.
This addon is released under the WTFPL - Do What The **** You Want To Public License.
Download here: Filebeam
Code posted for anyone who would just like to look.
Code:
--[[ ChatColor
Eradicator (2009)
This addon is free software. It comes without any warranty, to
the extent permitted by applicable law. You can redistribute it
and/or modify it under the terms of the Do What The **** You Want
To Public License, Version 2, as published by Sam Hocevar. See
included LICENSE.txt for more details. --]]
local orig_scm = SendChatMessage
color = true
stringcolor = "0099FF"
function SendChatMessage(msg,type,lang,chan)
local cmd = string.sub(msg,1,1)
local sendString = msg
if (cmd=="." or cmd=="!") then
orig_scm(msg,type,lang,chan);
elseif cmd=="#" then
if msg == "#color" then
if color == false then
color = true
DEFAULT_CHAT_FRAME:AddMessage("Color enabled.",1,0,0,1)
else
color = false
DEFAULT_CHAT_FRAME:AddMessage("Color disabed.",0,1,0,1)
end
elseif string.sub(msg,1,5) == "#set " then
stringcolor = string.sub(msg,6,13)
DEFAULT_CHAT_FRAME:AddMessage("|cFF" .. stringcolor .. "Color set to " .. stringcolor .. ".|r",0,1,0,1)
end
else
if color==true then
sendString = "\124cFF" .. stringcolor .. "\124Hitem: 19:0:0:0:0:0:0:0\124h" .. sendString .. "\124h\124r"
orig_scm(sendString,type,lang,chan)
else
orig_scm(sendString,type,lang,chan)
end
end
end
Frequently Asked Questions (FAQ)
It doesn't work. I get disconnected.
The chat color exploit has been fixed on your server. Tough luck.
How do I install this addon?
Download ChatColor.rar from the above Filebeam link. Extract it to your World of Warcraft\Interface\Addons folder.
What version of WoW does this work on?
It was designed on 2.3.0, i've done slight testing on 3.1.3 and it appears to work fine. Simply check 'Load out-of-date addons' on the Addons window, on the Character Select screen.
How do I use this addon?
There are two commands.
- #color - Toggles whether outbound messages are colored.
- #set ###### - Sets your color. This should be hexadecimal. There is no validation on input.
Enjoy.