alternative method for Guild delay function

This commit is contained in:
Crum
2018-01-28 18:44:07 -06:00
parent 1a34f1b4d1
commit 1cdd96dcfd
+3 -3
View File
@@ -1417,15 +1417,15 @@ function CH:DelayGuildMOTD()
local msg = GetGuildRosterMOTD() local msg = GetGuildRosterMOTD()
for i = 1, NUM_CHAT_WINDOWS do for i = 1, NUM_CHAT_WINDOWS do
chat = _G["ChatFrame"..i] chat = _G["ChatFrame"..i]
if i == 1 then -- TEMPORARY UNTIL FURTHER FIX for k, v in pairs(chat.messageTypeList) do
--if chat and chat:IsEventRegistered("CHAT_MSG_GUILD") then if chat and v == "GUILD" then
if msg and strlen(msg) > 0 then if msg and strlen(msg) > 0 then
local info = ChatTypeInfo["GUILD"] local info = ChatTypeInfo["GUILD"]
local string = format(GUILD_MOTD_TEMPLATE, msg) local string = format(GUILD_MOTD_TEMPLATE, msg)
chat:AddMessage(string, info.r, info.g, info.b, info.id) chat:AddMessage(string, info.r, info.g, info.b, info.id)
end end
chat:RegisterEvent("GUILD_MOTD") chat:RegisterEvent("GUILD_MOTD")
--end end
end end
end end
this:SetScript("OnUpdate", nil) this:SetScript("OnUpdate", nil)