Go to Page... |
## DependsOn: LibChatMessage
local chat = LibChatMessage("MyAddon", "MA") -- long and short tag to identify who is printing the message chat:Print("Simple message") -- instead of d() chat:Printf("Formatted %s", "message") -- instead of df() chat:SetTagColor("ff0000"):Print("Message with a different tag color") -- To change the tag color for e.g. warnings. The message itself can be colored with a color tag, although I can't really recommend doing that chat:SetEnabled(false) -- in case the output of this ChatProxy should be enabled. Could be used when a settings is supposed to disable chat messages for an addon chat:Print("Ignored message") -- won't show up
/chatmessage <command> [argument] <time> [on/off] Enables or disables the time prefix <chat> [on/off] Controls the time prefix on regular chat <format> [auto/12h/24h] Changes the used time format <tag> [off/short/long] Changes the length of the used tag <history> [on/off] Restore old chat after login <age> [seconds] The maximum age of restored chat Example: /chatmessage tag short
local chat = LibChatMessage.Create(longTag, shortTag)
local chat = LibChatMessage(longTag, shortTag)
local chat = chat:SetTagColor(color)
chat:Print(message)
chat:Printf(formatString, ...)
chat:SetEnabled(enabled)
LibChatMessage:ClearChat()
LibChatMessage:ClearHistory()
LibChatMessage:GetHistory()
LibChatMessage:SetTimePrefixEnabled(enabled)
local enabled = LibChatMessage:IsTimePrefixEnabled()
LibChatMessage:SetTimePrefixEnabled(enabled)
local enabled = LibChatMessage:IsTimePrefixEnabled()
LibChatMessage:SetTimePrefixFormat(format)
local format = LibChatMessage:GetTimePrefixFormat()
LibChatMessage:SetTagPrefixMode(mode)
local mode = LibChatMessage:GetTagPrefixMode()
LibChatMessage:SetChatHistoryEnabled(enabled)
local enabled = LibChatMessage:IsChatHistoryEnabled()
local enabled = LibChatMessage:IsChatHistoryActive()
LibChatMessage:SetChatHistoryMaxAge(maxAge)
local maxAge = LibChatMessage:GetChatHistoryMaxAge()
LibChatMessage:RegisterCustomChatLink(YOUR_LINK_TYPE) LibChatMessage:RegisterCustomChatLink(YOUR_LINK_TYPE, reformatLinkFunc)
local function reformatLink(linkStyle, linkType, data, displayText) return ZO_LinkHandler_CreateLinkWithFormat(displayText, nil, linkType, linkStyle, data) end LibChatMessage:RegisterCustomChatLink(YOUR_LINK_TYPE, reformatLink)
function addon:OnLinkClicked(link, button, text, color, linkType, ...) if linkType ~= YOUR_LINK_TYPE then return end if button == MOUSE_BUTTON_INDEX_LEFT then -- Do your stuff elseif button == MOUSE_BUTTON_INDEX_MIDDLE then -- Do your stuff end return true -- link has been handled end function addon:InitLinkHandler() LINK_HANDLER:RegisterCallback(LINK_HANDLER.LINK_CLICKED_EVENT, self.OnLinkClicked, self) LINK_HANDLER:RegisterCallback(LINK_HANDLER.LINK_MOUSE_UP_EVENT, self.OnLinkClicked, self) end
File Name |
Version |
Size |
Uploader |
Date |
1.2.0 |
10kB |
sirinsidiator |
04/22/21 01:33 PM |
|
1.1.3 |
5kB |
sirinsidiator |
03/02/20 01:26 PM |
|
1.1.2 |
5kB |
sirinsidiator |
03/02/20 12:10 PM |
|
1.1.1 |
6kB |
sirinsidiator |
02/25/20 01:55 PM |
|
1.1.0 |
6kB |
sirinsidiator |
02/24/20 02:43 AM |
|
1.0.1 |
5kB |
sirinsidiator |
06/01/19 05:15 AM |
|
1.0.0 |
5kB |
sirinsidiator |
05/28/19 09:18 AM |
Comment Options |
silvereyes |
View Public Profile |
Send a private message to silvereyes |
Find More Posts by silvereyes |
Add silvereyes to Your Buddy List |
sirinsidiator |
View Public Profile |
Send a private message to sirinsidiator |
Find More Posts by sirinsidiator |
Add sirinsidiator to Your Buddy List |
11/07/19, 10:35 AM | ||
|
||
|
silvereyes |
View Public Profile |
Send a private message to silvereyes |
Find More Posts by silvereyes |
Add silvereyes to Your Buddy List |
11/07/19, 06:48 PM | |
Also, if it's not too much to ask, I would also love a couple more options on the ChatProxy class:
|
|
|
silvereyes |
View Public Profile |
Send a private message to silvereyes |
Find More Posts by silvereyes |
Add silvereyes to Your Buddy List |
11/13/19, 08:15 PM | |
fwiw, here is the extended ChatProxy class that's now included with Postmaster and Unboxer:
Lua Code:
The tag suffix is something I use in Postmaster to append the account name of the person who sent the attachments to the tag.
Last edited by silvereyes : 11/13/19 at 10:45 PM.
|
|
|
silvereyes |
View Public Profile |
Send a private message to silvereyes |
Find More Posts by silvereyes |
Add silvereyes to Your Buddy List |
01/20/20, 11:16 PM | |
PTS error message
Just an FYI, I am seeing the following message on PTS today after using LibChatMessage in PostMaster:
Code:
EsoUI/Ingame/ChatSystem/ChatHandlers.lua:228: function expected instead of nil stack traceback: EsoUI/Ingame/ChatSystem/ChatHandlers.lua:228: in function 'ZO_ChatRouter:EmitChatEvent' |caaaaaa<Locals> self = [table:1]{fireCallbackDepth = 0}, eventCode = "LibChatMessage" </Locals>|r EsoUI/Ingame/ChatSystem/ChatHandlers.lua:264: in function 'ZO_ChatEvent' |caaaaaa<Locals> eventId = "LibChatMessage" </Locals>|r user:/AddOns/LibChatMessage/LibChatMessage.lua:204: in function 'ChatProxy:Print' |caaaaaa<Locals> self = [table:2]{shortTag = "|c99CCEFPM|r", shortTagPrefixEnabled = T, longTag = "|c99CCEFPostmaster|r", enabled = T, tagSuffix = "@silver_ice", retainTagColor = T}, message = "|t90%:90%:/esoui/art/icons/cra...", tag = "[|c99CCEFPM|r@silver_ice]" </Locals>|r user:/AddOns/LibLootSummary/List.lua:173: in function 'lls.List:Print' |caaaaaa<Locals> self = [table:3]{linkStyle = 0, sortedByQuality = T, showTrait = T, showIcon = T, hideSingularQuantities = T, suffix = "", sorted = F, enabled = T, combineDuplicates = T, minQuality = 0, sender = "@silver_ice", prefix = "", delimiter = " "}, lines = [table:4]{1 = "|t90%:90%:/esoui/art/icons/cra..."}, summary = "|t90%:90%:/esoui/art/icons/cra...", maxLength = 1200, _ = 1, line = "|t90%:90%:/esoui/art/icons/cra..." </Locals>|r user:/AddOns/Postmaster/classes/SenderSummary.lua:29: in function 'class.SenderSummary:Print' |caaaaaa<Locals> self = [table:3], tagSuffix = "" </Locals>|r user:/AddOns/Postmaster/classes/GroupedSenderSummary.lua:43: in function 'class.GroupedSenderSummary:Print' |caaaaaa<Locals> self = [table:5]{}, summaries = [table:6]{}, _ = 1, summary = [table:3] </Locals>|r user:/AddOns/Postmaster/Postmaster.lua:648: in function 'Postmaster:Reset' |caaaaaa<Locals> self = [table:7]{suffix = "", takingAll = F, returning = F, inboxUpdated = F, prefix = "", taking = F, debugMode = F, author = "silvereyes, Garkin & Zierk", mailIdLastOpened = 8.7943506256198e-315, title = "Postmaster", version = "3.10.0", name = "Postmaster"} </Locals>|r user:/AddOns/Postmaster/Postmaster.lua:1292: in function 'Postmaster.Callback_MailInbox_StateChange' |caaaaaa<Locals> oldState = "hiding", newState = "hidden", self = [table:7] </Locals>|r EsoUI/Libraries/Utility/ZO_CallbackObject.lua:116: in function 'ZO_CallbackObject:FireCallbacks' |caaaaaa<Locals> self = [table:8]{fireCallbackDepth = 1, wasRequestedToShowInGamepadPreferredMode = F, disallowEvaluateTransitionCompleteCount = 1, name = "mailInbox", restoresHUDSceneToggleUIMode = F, wasShownInGamepadPreferredMode = F, restoresHUDSceneToggleGameMenu = F, state = "hidden"}, eventName = "StateChange", registry = [table:9]{}, callbackInfoIndex = 3, callbackInfo = [table:10]{3 = F}, callback = user:/AddOns/Postmaster/Postmaster.lua:1268, deleted = F </Locals>|r EsoUI/Libraries/ZO_Scene/ZO_Scene.lua:276: in function 'ZO_Scene:SetState' |caaaaaa<Locals> self = [table:8], newState = "hidden", oldState = "hiding", name = "mailInbox" </Locals>|r EsoUI/Libraries/ZO_Scene/ZO_Scene.lua:426: in function 'ZO_Scene:OnTransitionComplete' |caaaaaa<Locals> self = [table:8], nextState = "hidden" </Locals>|r EsoUI/Libraries/ZO_Scene/ZO_Scene.lua:421: in function 'ZO_Scene:DetermineIfTransitionIsComplete' |caaaaaa<Locals> self = [table:8], nextState = "hidden" </Locals>|r EsoUI/Libraries/ZO_Scene/ZO_Scene.lua:343: in function 'ZO_Scene:OnSceneFragmentStateChange' |caaaaaa<Locals> self = [table:8], fragment = [table:11]{allowShowHideTimeUpdates = F, fireCallbackDepth = 0, animationTemplate = "FadeSceneAnimation", duration = 200, state = "hidden"}, oldState = "hiding", newState = "hidden" </Locals>|r EsoUI/Libraries/ZO_Scene/ZO_SceneFragment.lua:146: in function 'ZO_SceneFragment:SetState' |caaaaaa<Locals> self = [table:11], newState = "hidden", oldState = "hiding", currentScene = [table:8] </Locals>|r EsoUI/Libraries/ZO_Scene/ZO_SceneFragment.lua:156: in function 'ZO_SceneFragment:OnHidden' |caaaaaa<Locals> self = [table:11] </Locals>|r EsoUI/Libraries/ZO_Scene/ZO_SceneFragmentTemplates.lua:75: in function '(anonymous)' |caaaaaa<Locals> _ = ud, completedPlaying = T </Locals>|r |
|
|
silvereyes |
View Public Profile |
Send a private message to silvereyes |
Find More Posts by silvereyes |
Add silvereyes to Your Buddy List |
03/02/20, 05:56 AM | |
Forum posts: 0
File comments: 8
Uploads: 0
|
after todays update i get these errors
user:/AddOns/LibChatMessage/LibChatMessage.lua:159: function expected instead of nil stack traceback: user:/AddOns/LibChatMessage/LibChatMessage.lua:159: in function '(anonymous)' [C]: in function 'pcall' user:/AddOns/LibChatMessage/LibChatMessage.lua:158: in function 'SafeAddEventFormatter' user:/AddOns/LibChatMessage/LibChatMessage.lua:181: in function '(main chunk)' user:/AddOns/LibChatMessage/LibChatMessage.lua:181: in function '(main chunk)' it seems to be affecting Awesome Guild store i.e. user:/AddOns/AwesomeGuildStore/API.lua:4: attempt to index a nil value stack traceback: user:/AddOns/AwesomeGuildStore/API.lua:4: in function '(main chunk)' Thanks for your work with Addons |
|
Barnicle |
View Public Profile |
Send a private message to Barnicle |
Send email to Barnicle |
Find More Posts by Barnicle |
Add Barnicle to Your Buddy List |
03/02/20, 06:06 AM | ||
|
||
|
sirinsidiator |
View Public Profile |
Send a private message to sirinsidiator |
Send email to sirinsidiator |
Find More Posts by sirinsidiator |
Add sirinsidiator to Your Buddy List |
03/02/20, 07:00 AM | |
Forum posts: 0
File comments: 10
Uploads: 0
|
Bug after ESO 03/02 update
Many Thanks for your work. But I'll remove it from my game for a while. The bug after ZoS' chat API upgrade is very invasive and annoying. I'll put LibChat back when you fix the issue. Thanks,
|
|
Scaletho |
View Public Profile |
Send a private message to Scaletho |
Send email to Scaletho |
Find More Posts by Scaletho |
Add Scaletho to Your Buddy List |
03/02/20, 07:41 AM | |
yeah, the new changes infected many addons like AGS, postmaster mail and many more.
@sirinsidator thx for the info... and i hope this fix will come soon |
|
|
FWSWBN |
View Public Profile |
Send a private message to FWSWBN |
Send email to FWSWBN |
Find More Posts by FWSWBN |
Add FWSWBN to Your Buddy List |
03/02/20, 08:18 AM | ||
Forum posts: 0
File comments: 1
Uploads: 0
|
UI-Fehler user:/AddOns/LibChatMessage/LibChatMessage.lua:159: function expected instead of nil stack traceback: user:/AddOns/LibChatMessage/LibChatMessage.lua:159: in function '(anonymous)' [C]: in function 'pcall' user:/AddOns/LibChatMessage/LibChatMessage.lua:158: in function 'SafeAddEventFormatter' |caaaaaa<Locals> eventId = "LibChatMessage", eventFormatter = user:/AddOns/LibChatMessage/LibChatMessage.lua:165 </Locals>|r user:/AddOns/LibChatMessage/LibChatMessage.lua:181: in function '(main chunk)' |caaaaaa<Locals> LIB_IDENTIFIER stack traceback: [C]: in function 'assert' user:/AddOns/LibChatMessage/LibChatMessage.lua:162: in function 'SafeAddEventFormatter' <Locals> eventId = "LibChatMessage", eventFormatter = user:/AddOns/LibChatMessage/LibChatMessage.lua:165, success = F, err = "user:/AddOns/LibChatMessage/Li..." </Locals>|r user:/AddOns/LibChatMessage/LibChatMessage.lua:181: in function '(main chunk)' |caaaaaa<Locals> LIB_IDENTIFIER = "LibChatMessage", lib = [table:1]{chatHistoryActive = T}, TAG_FORMAT = "[%s]", COLOR_FORMAT = "|c%s%s|r", MESSAGE_TEMPLATE = "%s %s", SYSTEM_TAG = "[System]", TIME_FORMAT_AUTO = "[%X]", TIME_FORMAT_12 = "[%I:%M:%S %p]", TIME_FORMAT_24 = "[%T]", TIME_FORMATS = [table:2]{1 = "[%X]"}, TIME_FORMAT_MAPPING = [table:3]{auto = "[%X]", 24h = "[%T]", 12h = "[%I:%M:%S %p]"}, REVERSE_TIME_FORMAT_MAPPING = [table:4]{[%X] = "auto", [%I:%M:%S %p] = "12h", [%T] = "24h"}, TAG_PREFIX_OFF = 1, TAG_PREFIX_LONG = 2, TAG_PREFIX_SHORT = 3, TIMESTAMP_INDEX = 1, MAX_HISTORY_LENGTH = 10000, TRIMMED_HISTORY_LENGTH = 9000, strlower = [C]:-1, tconcat = [C]:-1 </Locals>|r |
|
|
Dukeland |
View Public Profile |
Send a private message to Dukeland |
Send email to Dukeland |
Find More Posts by Dukeland |
Add Dukeland to Your Buddy List |
03/02/20, 08:22 AM | |
Is there a quick fix patch just to get AGS and others working at least?
Update:Nevermind, the most usefull stuff is still present. Just the nice search functions are gone. TTC and MM still works in the default ZOS guild store window. Now I just wait for the update today. :-D
Last edited by Techwolf : 03/02/20 at 08:48 AM.
|
|
|
Techwolf |
View Public Profile |
Send a private message to Techwolf |
Send email to Techwolf |
Visit Techwolf's homepage! |
Find More Posts by Techwolf |
Add Techwolf to Your Buddy List |
03/02/20, 08:34 AM | |
Forum posts: 0
File comments: 21
Uploads: 0
|
Today's ESO Update Broke LibChatMessage
Today's, March 2, 2020, ESO update broke LibChatMessage and AwesomeGuildStore.
Here's the error from LibChatMessage... UI Error Code:
<Locals> LIB_IDENTIFIER stack traceback: [C]: in function 'assert' user:/AddOns/LibChatMessage/LibChatMessage.lua:162: in function 'SafeAddEventFormatter' <Locals> eventId = "LibChatMessage", eventFormatter = user:/AddOns/LibChatMessage/LibChatMessage.lua:165, success = F, err = "user:/AddOns/LibChatMessage/Li..." </Locals>|r user:/AddOns/LibChatMessage/LibChatMessage.lua:181: in function '(main chunk)' |caaaaaa<Locals> LIB_IDENTIFIER = "LibChatMessage", lib = [table:1]{chatHistoryActive = T}, TAG_FORMAT = "[%s]", COLOR_FORMAT = "|c%s%s|r", MESSAGE_TEMPLATE = "%s %s", SYSTEM_TAG = "[System]", TIME_FORMAT_AUTO = "[%X]", TIME_FORMAT_12 = "[%I:%M:%S %p]", TIME_FORMAT_24 = "[%T]", TIME_FORMATS = [table:2]{1 = "[%X]"}, TIME_FORMAT_MAPPING = [table:3]{24h = "[%T]", 12h = "[%I:%M:%S %p]", auto = "[%X]"}, REVERSE_TIME_FORMAT_MAPPING = [table:4]{[%X] = "auto", [%I:%M:%S %p] = "12h", [%T] = "24h"}, TAG_PREFIX_OFF = 1, TAG_PREFIX_LONG = 2, TAG_PREFIX_SHORT = 3, TIMESTAMP_INDEX = 1, MAX_HISTORY_LENGTH = 10000, TRIMMED_HISTORY_LENGTH = 9000, strlower = [C]:-1, tconcat = [C]:-1 </Locals>|r |
|
BlazeOfGlory |
View Public Profile |
Send a private message to BlazeOfGlory |
Send email to BlazeOfGlory |
Visit BlazeOfGlory's homepage! |
Find More Posts by BlazeOfGlory |
Add BlazeOfGlory to Your Buddy List |
03/02/20, 09:17 AM | |
Forum posts: 0
File comments: 33
Uploads: 0
|
user:/AddOns/LibChatMessage/LibChatMessage.lua:159: function expected instead of nil
stack traceback: user:/AddOns/LibChatMessage/LibChatMessage.lua:159: in function '(anonymous)' [C]: in function 'pcall' user:/AddOns/LibChatMessage/LibChatMessage.lua:158: in function 'SafeAddEventFormatter' user:/AddOns/LibChatMessage/LibChatMessage.lua:181: in function '(main chunk)' user:/AddOns/LibChatMessage/LibChatMessage.lua:181: in function '(main chunk)' help me plz |
|
Muchtie |
View Public Profile |
Send a private message to Muchtie |
Send email to Muchtie |
Visit Muchtie's homepage! |
Find More Posts by Muchtie |
Add Muchtie to Your Buddy List |
03/02/20, 09:57 AM | |
Forum posts: 0
File comments: 12
Uploads: 0
|
Just today, cannot do anything without getting error messages. Even when not doing anything, it shows up and won't stay "dismissed". I love the addons, help please.
user:/AddOns/LibChatMessage/LibChatMessage.lua:108: attempt to index a nil value stack traceback: user:/AddOns/LibChatMessage/LibChatMessage.lua:108: in function '(anonymous)' |caaaaaa<Locals> formattedEventText = "|H1:character:Myraian|h[Myraia...", fromDisplayName = "@Kiyakotari", rawMessageText = "The same way you locate most l...", timeStamp = 1583164537 </Locals>|r (tail call): ? EsoUI/Ingame/ChatSystem/ChatHandlers.lua:247: in function 'ZO_ChatRouter:FormatAndAddChatMessage' |caaaaaa<Locals> self = [table:1]{fireCallbackDepth = 0}, eventKey = 131103, eventCategory = 6, messageFormatter = user:/AddOns/LibChatMessage/LibChatMessage.lua:96 </Locals>|r EsoUI/Ingame/ChatSystem/ChatHandlers.lua:212: in function 'OnChatEvent' |caaaaaa<Locals> eventCode = 131103 </Locals>|r I finally quit. Game isn't playable with addons allowed now.
Last edited by linda535 : 03/02/20 at 10:07 AM.
|
|
linda535 |
View Public Profile |
Send a private message to linda535 |
Send email to linda535 |
Visit linda535's homepage! |
Find More Posts by linda535 |
Add linda535 to Your Buddy List |
You have just downloaded by the author . If you like this AddOn why not consider supporting the author? This author has set up a donation account. Donations ensure that authors can continue to develop useful tools for everyone.