Skip to content

Commit 9ecb276

Browse files
author
ALPSquid
committed
Removes active check from PrintAddonDisabledMessage to make intent clearer
1 parent 41b1a36 commit 9ecb276

2 files changed

Lines changed: 4 additions & 8 deletions

File tree

WCCCAddOn/UI.lua

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -158,11 +158,7 @@ end
158158

159159
---
160160
--- Prints a notification saying the addon has been disabled.
161-
--- If addonActive is true, this does nothing.
162161
---
163-
function WCCCAD_UI:PrintAddonDisabledMessage()
164-
if WCCCAD.addonActive == true then
165-
return
166-
end
162+
function WCCCAD_UI:PrintAddonDisabledMessage()
167163
WCCCAD_UI:PrintAddOnMessage("Character not in the WCCC, addon commands will be disabled on this character.", ns.consts.MSG_TYPE.WARN)
168164
end

WCCCAddOn/WCCCAddOn.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,9 @@ function WCCCAD:WCCCCommand(input)
6262
if args == nil or next(args) == nil then
6363
WCCCAD.UI:Show()
6464

65-
WCCCAD:CheckAddonActive()
65+
WCCCAD:CheckAddonActive(true)
6666
else
67-
if WCCCAD:CheckAddonActive() == false then
67+
if WCCCAD:CheckAddonActive(true) == false then
6868
return
6969
end
7070

@@ -87,7 +87,7 @@ function WCCCAD:CheckAddonActive(printMsg)
8787
local guildName = IsInGuild() and GetGuildInfo("player") or nil
8888
WCCCAD.addonActive = guildName == "Worgen Cub Clubbing Club";
8989

90-
if printMsg then
90+
if printMsg and not WCCCAD.addonActive then
9191
WCCCAD.UI:PrintAddonDisabledMessage()
9292
end
9393

0 commit comments

Comments
 (0)