I discovered the source of the taint I was experiencing with the community creation/destruction/joining. In the following function:
Lua Code:
local function AddMessage(self, text, ...)
--Remove player brackets
text = text:gsub('|Hplayer:([^%|]+)|h%[([^%]]+)%]|h', '|Hplayer:%1|h%2|h')
--Remove Away and Busy Tags
text = text:gsub('<Away>', '')
text = text:gsub('<Busy>', '')
--Strip yells: says: from chat
text = text:gsub('|Hplayer:([^%|]+)|h(.+)|h says:', '|Hplayer:%1|h%2|h:')
text = text:gsub('|Hplayer:([^%|]+)|h(.+)|h yells:', '|Hplayer:%1|h%2|h:')
--Shorten GMotD and change online/offline warnings
text = text:gsub('Guild Message of the Day:', 'GMotD -')
text = text:gsub('has come online.', '+')
text = text:gsub('has gone offline.', '-')
--channel replace (Trade and custom)
text = text:gsub('|h%[(%d+)%. .-%]|h', '|h%1.|h')
--url search
text = text:gsub('([wWhH][wWtT][wWtT][%.pP]%S+[^%p%s])', '|cffffffff|Hurl:%1|h[%1]|h|r')
return self.DefaultAddMessage(self, text, ...)
end
the last line
Lua Code:
return self.DefaultAddMessage(self, text, ...)
is causing the taint. I don't doubt that the DefaultSetItemRef line you mentioned could also be causing taint, but none that I've come across yet. The above section I was able to reproduce 10/10 times and 0/10 times when I commented that one line of code out.
You wouldn't by chance know how I could better implement the AddMessage function to change things without causing taint, would you?