diff --git a/Adherent-BCC.toc b/Adherent-BCC.toc index 0275cac..62b31a4 100644 --- a/Adherent-BCC.toc +++ b/Adherent-BCC.toc @@ -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 diff --git a/Adherent.toc b/Adherent.toc index 0275cac..62b31a4 100644 --- a/Adherent.toc +++ b/Adherent.toc @@ -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 diff --git a/Locales/enUS.lua b/Locales/enUS.lua index 3b3b7a6..f6e3284 100644 --- a/Locales/enUS.lua +++ b/Locales/enUS.lua @@ -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 ]] diff --git a/core.lua b/core.lua index b68cc36..07ba9a5 100644 --- a/core.lua +++ b/core.lua @@ -111,6 +111,14 @@ local cmd = { end, order = 1, }, + options = { + type = "execute", + name = _G.OPTIONS, + func = function() + adherent:showOptions() + end, + order = 2, + } } } @@ -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() @@ -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 @@ -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