Just updated this morning, and I seem to have lost timestamps on all sends to channels (guild, custom, general, etc). Says, emotes, etc still are getting timestamped.
so configure it?
edit: im not giving any insurance. thats why my addons are not found on addon sites.
I experienced what I thought was a bug in the latest update, and I wanted to let you know about it. Sorry.
After looking at the regexp in the lua, it turns out that the problem is that my timestamp string is set to [%H:%M] and since ChannelNames is replacing everything between [ and ] my timestamp is getting eaten.
So I guess my problem report is better rephrased as a feature request. It would be cool if ChannelNames did not replace timestamps with [ and ] characters.
thanks, ive got that code working nicely, now im puzzling myself over how to incorporate the color code Aileen posted so that the timestamps inherit the color of the message itself.
would is just be replacing the |cffffffff%s|r with the [%s] or something else all together?
I'm glad you followed someone else's code for the format function and not mine, since I typed something totally non-working out while raiding. ;)
The %s part is "this is where the string goes" (in this case, the date). Surrounding it with |cffffffff and |r is what colors it white. So if you want just the time in the same color as the channel, change that to just plain "%s". I like brackets around my times to separate them, so that is why I use "[%s]".
1 a way to put "message timestamp" instead of the default "timestamp message"
2 adding a | or [ or < around the timestamps to seperate them from the code.
so far im stumped.
function idChat2_Timestamps:AddMessage(frame, text, red, green, blue, id)
local name = frame:GetName()
text = text or ''
red = red or ''
green = green or ''
blue = blue or ''
id = id or nil
if name == "ChatFrame2" then
text = string.format('|cffffffff%s|r %s', date('%X'), text)
text = string.format('%s |cffffffff%s|r', text, date('%X'))
self.hooks[frame].AddMessage.orig(frame, text, red, green, blue, id)
You can't change the order of the parameters to the function, you have to change the order in the format string.
Personally, I use this string:
text = string.format('[%s] %s', date('%H:%M'), text)
because I just want [HH:MM] in the same color as the channel the message was sent to.
Edit: Fixed bad code, clearly I shouldn't try replying while raiding. :)