# HG changeset patch # User Farmbuyer of US-Kilrogg # Date 1323544330 0 # Node ID 332550e56fd28a43099994dde093f8b992ee9cb9 # Parent f80357fa754aab2c3df6662d4f7816a2aa71a35f Handle the case of a guildmaster opening the main window manually. This whole thing should be moved to LoD. diff -r f80357fa754a -r 332550e56fd2 main.lua --- a/main.lua Wed Nov 30 22:07:07 2011 +0000 +++ b/main.lua Sat Dec 10 19:12:10 2011 +0000 @@ -131,6 +131,8 @@ self:RegisterEvent("GUILD_RANKS_UPDATE") self:RegisterChatCommand("wrdw", "OnChatCommand") + -- Ideally, most of this stuff wouldn't be done at load time at all; this + -- whole addon should be LoD. if (not IsGuildLeader()) and self.db.profile.guildcontrol then local function onclick() addon:BuildWindow() end local function onenter(this) GameTooltip_AddNewbieTip(this, GUILDCONTROL, 1.0, 1.0, 1.0, "/wrdw", 1) end @@ -159,6 +161,10 @@ end function addon:OnChatCommand (input) + if not NUM_RANK_FLAGS then -- in case a GM didn't get it loaded earlier + GuildFrame_LoadUI() + UIParentLoadAddOn("Blizzard_GuildControlUI") + end if not input or input:trim() == "" then if self.display and self.display:IsShown() then self.display:Hide()