Make sure gsub doesnt fuck up the return with it's count return
Adrian L Lange [10-03-11 - 20:38]
Make sure gsub doesnt fuck up the return with it's count return
diff --git a/RealLinks.lua b/RealLinks.lua
index ad85023..7f32225 100644
--- a/RealLinks.lua
+++ b/RealLinks.lua
@@ -33,7 +33,8 @@ end
local function AddLinkColors(self, event, msg, ...)
local data = string.match(msg, '|H(.-)|h(.-)|h')
if(data) then
- return false, msg:gsub('|H(.-)|h(.-)|h', GetLinkColor(data) .. '|H%1|h%2|h|r'), ...
+ local newmsg = string.gsub(msg, '|H(.-)|h(.-)|h', GetLinkColor(data) .. '|H%1|h%2|h|r')
+ return false, newmsg, ...
else
return false, msg, ...
end