Skip to content

Commit 313cde9

Browse files
committed
gmotd: Add a safety check in case we've entered messaging lockdown
1 parent 9de2fc8 commit 313cde9

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

gmotd.lua

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,12 @@ BCM.modules[#BCM.modules+1] = function()
1010
BCM.Events.LOADING_SCREEN_DISABLED = nil
1111
C_Timer.After(0, function() -- Timers become functional 1 frame after the loading screen is done
1212
C_Timer.After(2, function()
13-
local gmotd = GetGuildRosterMOTD()
14-
if gmotd == "" or gmotd:find("^ +$") then return end
15-
local info = ChatTypeInfo.GUILD
16-
ChatFrame1:AddMessage("|cFF33FF99BasicChatMods|r: "..(GUILD_MOTD_TEMPLATE):format(gmotd), info.r, info.g, info.b)
13+
if not C_ChatInfo.InChatMessagingLockdown or not C_ChatInfo.InChatMessagingLockdown() then
14+
local gmotd = GetGuildRosterMOTD()
15+
if not gmotd or gmotd == "" or gmotd:find("^ +$") then return end
16+
local info = ChatTypeInfo.GUILD
17+
ChatFrame1:AddMessage("|cFF33FF99BasicChatMods|r: "..(GUILD_MOTD_TEMPLATE):format(gmotd), info.r, info.g, info.b)
18+
end
1719
end)
1820
end)
1921
end

0 commit comments

Comments
 (0)