mirror of
https://github.com/Bluewhale1337/ElvUIModernized.git
synced 2026-07-27 16:34:45 +00:00
update DelayGuildMOTD function in chat
This commit is contained in:
@@ -1416,17 +1416,21 @@ function CH:DelayGuildMOTD()
|
||||
if delay < 7 then return end
|
||||
local msg = GetGuildRosterMOTD()
|
||||
for i = 1, NUM_CHAT_WINDOWS do
|
||||
local channel
|
||||
chat = _G["ChatFrame"..i]
|
||||
for k, v in pairs(chat.messageTypeList) do
|
||||
if chat and v == "GUILD" then
|
||||
if msg and strlen(msg) > 0 then
|
||||
local info = ChatTypeInfo["GUILD"]
|
||||
local string = format(GUILD_MOTD_TEMPLATE, msg)
|
||||
chat:AddMessage(string, info.r, info.g, info.b, info.id)
|
||||
end
|
||||
chat:RegisterEvent("GUILD_MOTD")
|
||||
if v == "GUILD" then
|
||||
channel = v
|
||||
end
|
||||
end
|
||||
if chat and channel then
|
||||
if msg and strlen(msg) > 0 then
|
||||
local info = ChatTypeInfo["GUILD"]
|
||||
local string = format(GUILD_MOTD_TEMPLATE, msg)
|
||||
chat:AddMessage(string, info.r, info.g, info.b, info.id)
|
||||
end
|
||||
chat:RegisterEvent("GUILD_MOTD")
|
||||
end
|
||||
end
|
||||
this:SetScript("OnUpdate", nil)
|
||||
end)
|
||||
|
||||
Reference in New Issue
Block a user