Skip to content

Commit

Permalink
add chatframe feedback to enabled/suspended status
Browse files Browse the repository at this point in the history
link directly to release page in update notifications
better guard against invalid data in guild cache method
add command-line for easy showing options and toggling addon when minimap hidden
  • Loading branch information
Road-block committed Feb 23, 2022
1 parent 70b90db commit 50e77e3
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Adherent-BCC.toc
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
## Author: Roadblock
## Title: Adherent
## Notes: Adherent lets you define rules for auto accepting follow, group join and group invite requests.
## Version: 1.0.1
## Version: 1.0.2
## X-Alpha:
## X-Website: https://github.com/Road-block/Adherent
## X-Website: https://github.com/Road-block/Adherent/releases/latest
## OptionalDeps: Ace3
## SavedVariables: AdherentDB

Expand Down
4 changes: 2 additions & 2 deletions Adherent.toc
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
## Author: Roadblock
## Title: Adherent
## Notes: Adherent lets you define rules for auto accepting follow, group join and group invite requests.
## Version: 1.0.1
## Version: 1.0.2
## X-Alpha:
## X-Website: https://github.com/Road-block/Adherent
## X-Website: https://github.com/Road-block/Adherent/releases/latest
## OptionalDeps: Ace3
## SavedVariables: AdherentDB

Expand Down
4 changes: 4 additions & 0 deletions Locales/enUS.lua
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,12 @@ if not L then return end
L["Indicate known %s in player tooltips with an icon after their Name|T%s:15|t"] = true
L["Quick Settings"] = true
L["[Suspended]"] = true
L["[Enabled]"] = true
L["Discovered <%s>"] = true
L["Removing <%s> from known"] = true
L["went AFK"] = true
L["returned from AFK"] = true
L["%s %s at %s"] = true
L.DEFAULT_KEYWORDS = [[• Start Follow: |cffdcdcdc!fme|r%s
• Stop Following: |cffdcdcdc!fno|r%s
]]
Expand Down
23 changes: 21 additions & 2 deletions core.lua
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,14 @@ local cmd = {
end,
order = 1,
},
options = {
type = "execute",
name = _G.OPTIONS,
func = function()
adherent:showOptions()
end,
order = 2,
}
}
}

Expand Down Expand Up @@ -1075,10 +1083,12 @@ function adherent:OnEnable() -- 2. PLAYER_LOGIN

self:defaultKWHash()
self:optionsKWHash()
self:Print(C:Green(L["[Enabled]"]))
end

function adherent:OnDisable() -- ADHOC
self.db.char.suspend = true
self:Print(C:Red(L["[Suspended]"]))
end

function adherent:RefreshConfig()
Expand Down Expand Up @@ -1560,6 +1570,15 @@ function adherent:OnCommReceived(prefix, msg, distro, sender)
self:updateKnown(sender,what)
elseif who == "AFK" then
self:updateKnown(sender)
if self.db.char.echo then
local status
if data then
status = data=="1" and L["went AFK"] or L["returned from AFK"]
if status and what then
self:debugPrint(format(L["%s %s at %s"],sender, status, what))
end
end
end
end
end
end
Expand Down Expand Up @@ -1625,8 +1644,8 @@ function adherent:GUILD_ROSTER_UPDATE()
end
for i=1, GetNumGuildMembers() do
local name,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,guid = GetGuildRosterInfo(i)
name = Ambiguate(name, "short") --"mail" = always name-realm, "short" = always just name
if name ~= _G.UNKNOWNOBJECT then
if name and name ~= _G.UNKNOWNOBJECT then
name = Ambiguate(name, "short") --"mail" = always name-realm, "short" = always just name
roster[name] = guid or true
end
end
Expand Down

0 comments on commit 50e77e3

Please sign in to comment.