WoWInterface SVN idChat

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /
    from Rev 7 to Rev 8
    Reverse comparison

Rev 7 → Rev 8

trunk/Addon.lua
64,11 → 64,25
local function AddMessage(frame, text, red, green, blue, id)
text = tostring(text) or ''
 
-- channels
for k,v in pairs(replaces) do
text = text:gsub('|h%['..k..'%]|h', '|h'..v..'|h')
end
 
text = text:gsub('(|Hplayer.-|h)%[(.-)%].-:', '%1%2|h:')
-- players
text = text:gsub('(|Hplayer.-|h)%[(.-)%]|h', '%1%2|h')
 
-- normal messages
text = text:gsub(' says:', ':')
 
-- whispers
text = text:gsub(' whispers:', ' <')
text = text:gsub('To (|Hplayer.+|h):', '%1 >')
 
-- achievements
text = text:gsub('(|Hplayer.+|h) has earned the achievement (.+)!', '%1 ! %2')
 
-- timestamp
text = '|cff999999' .. date('%H%M') .. '|r ' .. text
 
return hooks[frame](frame, text, red, green, blue, id)