This addon allows the user to specify their own format of timestamp, which will prefix every message added to any of the seven chat frames. Type "/cct" to view the syntax to customize the pattern. Remember to place your pattern between quotation marks, or it will not be recognized. This is done so that trailing spaces can be used; the game's slash command handler would otherwise discard these extra characters, presuming them to be useless whitespace.
Feedback and Inquiries
I welcome feedback for any of my addons, including this one. However, if the feedback is a bug report or feature request, please use the methods on this page (the "Bugs" and "Features" buttons below the "Download" button in the top right) to alert me, instead of posting in the "Comments" section of this page, as it will take me longer to reply to you if you post there. For feedback or inquiries not related to bugs or features, such as information about translating this addon to another language or a request for a detailed explanation of a certain bit of code, please contact me directly via one of the methods listed in the "Preamble" section of my author portal's introduction text. Following these guidelines will ensure that I read and reply to your message.
History of Changes
See the readme file in this addon's folder, or my author portal, for an explanation of the versioning system.
- Updated TOC number to 20003.
- Various efficiency boosts.
- Fixed an issue where blank spaces at the end of the pattern were being ignored during parsing.
- Changed the TOC number to be compatible with The Burning Crusade. To use in classic WoW, check the "Load out of date AddOns" button at the addon selection screen.
- Rewritten to an object-oriented format for efficiency and maintainability.
- The space between the timestamp and the rest of the message is no longer automatically concatenated. Your stored pattern format will have the space added to the end when you first log in, to preserve the current display, but if you wish to remove the space you can easily do so by modifying the pattern with the standard "/cct pattern" command.
- Now stores the original AddMessage method of every chat frame regardless of whether it differs from ChatFrame1.AddMessage. The methods are stored in a table accessible at "CustomChatTimestamps.Original_ChatFrames_AddMessages". This change improves compatibility.
- Changed pattern storage from a key in a table to just a plain string, since there was never more than that single key in the table.
See the readme file in this addon's folder for earlier changes.
The timestamp patterns available in this addon are all of the standard patterns available in the C strftime function, specifically from this page:
Any of the entries in that list which are labeled as "an extension of the ANSI standard" are evidently not valid patterns in WoW Lua, as they cause the date function to error.
Also, a side effect of this addon's hook to the AddMessage method of the chat frames is that, because the "tostring" function is used on the message argument, passing nil, table, or boolean values to AddMessage will no longer produce a Blizzard error.
To access the original, pre-hook AddMessage methods, use one of the seven chat frame objects as an index in the "CustomChatTimestamps.Original_ChatFrames_AddMessages" table.