From 25a9d6e7004587934c9ea179c3479531c6c7ac04 Mon Sep 17 00:00:00 2001 From: Ade <923+ade@noreply.octowow.st> Date: Wed, 14 Oct 2026 12:30:24 +0000 Subject: [PATCH] =?UTF-8?q?=D0=97=D0=B0=D0=B3=D1=80=D1=83=D0=B7=D0=B8?= =?UTF-8?q?=D1=82=D1=8C=20=D1=84=D0=B0=D0=B9=D0=BB=D1=8B=20=D0=B2=20=C2=AB?= =?UTF-8?q?/=C2=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AdeAlts.toc | 2 +- CHANGELOG.md | 3 +++ core.lua | 2 +- events.lua | 23 ++++++++++++++++++++--- sync.lua | 6 ++++++ 5 files changed, 31 insertions(+), 5 deletions(-) diff --git a/AdeAlts.toc b/AdeAlts.toc index c82abf3..066de7a 100644 --- a/AdeAlts.toc +++ b/AdeAlts.toc @@ -2,7 +2,7 @@ ## Title: Ade Alts ## Notes: Alt manager: cooldowns, inventory, bank, gear, professions and missing recipes of all your characters. /ade ## Author: Ade -## Version: 1.2.0 +## Version: 1.2.1 ## SavedVariables: AdeAltsDB, ProfCDTrackerDB ## OptionalDeps: pfUI, SuperWoW, nampower core.lua diff --git a/CHANGELOG.md b/CHANGELOG.md index 8755af3..382a952 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # Changelog +## 1.2.1 +- `/ade del` now also ignores the character afterwards (it was re-added by the next chat broadcast). New `/ade unignore ` and `/ade chat` (switch guild / party / raid sync off). + ## 1.2.0 - Professions view reworked: **Known / Missing** recipes per profession, required skill level in front of every recipe (coloured by how close it is to the current skill), sort by **Level** or **Name**. diff --git a/core.lua b/core.lua index 477aa8c..08664df 100644 --- a/core.lua +++ b/core.lua @@ -7,7 +7,7 @@ local AA = AdeAlts -- Command: /pcd Minimap button: auto-docked by pfUI's addon button panel. AA.ADDON = "AdeAlts" -AA.VERSION = "1.2.0" +AA.VERSION = "1.2.1" AA.PREFIX = "PCDT" AA.DAY = 86400 AA.RDATA = {} -- recipe database, filled by the data_*.lua files diff --git a/events.lua b/events.lua index 5ce35c9..f5ea661 100644 --- a/events.lua +++ b/events.lua @@ -163,7 +163,7 @@ ev:SetScript("OnEvent", function() AA.bagDirty = true elseif event == "CHAT_MSG_ADDON" then - if arg1 == AA.PREFIX and AA.db and arg4 ~= UnitName("player") then + if arg1 == AA.PREFIX and AA.db and not AA.db.noChat and arg4 ~= UnitName("player") then if arg2 == "R" then if AA.me and GetTime() - AA.lastReply > 5 then AA.lastReply = GetTime() @@ -266,16 +266,33 @@ SlashCmdList["PROFCD"] = function(msg) elseif cmd == "del" and arg ~= "" then local a = string.lower(arg) local n = 0 + AA.db.ignored = AA.db.ignored or {} for k, c in pairs(AA.db.chars) do if k ~= AA.myKey and (string.lower(c.name) == a or string.lower(k) == a) then AA.db.chars[k] = nil + AA.db.ignored[k] = true -- do not accept this character again from chat / shared file n = n + 1 end end - AA.Print("removed " .. n .. " character(s).") + AA.Print("removed " .. n .. " character(s) and ignoring them from now on (/ade unignore undoes it).") + AA.fileDirty = true AA.Refresh() + if AA.RefreshManager then AA.RefreshManager() end + elseif cmd == "unignore" and arg ~= "" then + local a = string.lower(arg) + local n = 0 + for k in pairs(AA.db.ignored or {}) do + if string.lower(k) == a or string.lower(string.gsub(k, "%-.*$", "")) == a then + AA.db.ignored[k] = nil + n = n + 1 + end + end + AA.Print("no longer ignoring " .. n .. " character(s).") + elseif cmd == "chat" then + AA.db.noChat = not AA.db.noChat + AA.Print("guild / party / raid sync " .. (AA.db.noChat and "|cffff6060OFF|r (nothing is sent or accepted from chat)" or "|cff40ff40ON|r") .. ".") else - AA.Print("/ade - alts window | cd (cooldowns) | find | list | sync | scan | status | debug | bags | export | import | minimap | alert | reset | del ") + AA.Print("/ade - alts window | cd (cooldowns) | find | list | sync | scan | status | debug | bags | chat | unignore | export | import | minimap | alert | reset | del ") end end diff --git a/sync.lua b/sync.lua index 42225f8..a25da68 100644 --- a/sync.lua +++ b/sync.lua @@ -21,6 +21,7 @@ local function Encode(c) end function AA.Send(msg) + if AA.db and AA.db.noChat then return end if IsInGuild and IsInGuild() then SendAddonMessage(AA.PREFIX, msg, "GUILD") end if GetNumRaidMembers() > 0 then SendAddonMessage(AA.PREFIX, msg, "RAID") @@ -40,6 +41,7 @@ function AA.ReceiveRecord(text) if not name or name == "" then return false end upd = tonumber(upd) or 0 local k = name .. "-" .. realm + if AA.db.ignored and AA.db.ignored[k] then return false end local c = AA.db.chars[k] if c and (c.updated or 0) > upd then return false end -- we already have newer data if not c then @@ -83,6 +85,7 @@ local function ReceiveAlt(text) string.find(text, "^A%^([^%^]*)%^([^%^]*)%^([^%^]*)%^(%d*)%^(%d*)%^(%d*)%^(%d*)%^(%d*)%^([^%^]*)%^(.*)$") if not name or name == "" then return false end local k = name .. "-" .. realm + if AA.db.ignored and AA.db.ignored[k] then return false end local c = AA.db.chars[k] if not c then c = { name = name, realm = realm, class = class, cds = {}, remote = true } @@ -132,6 +135,7 @@ local function ReceiveProf(text) if not name or name == "" or pname == "" then return false end if AA.BadProf(pname, tonumber(m)) then return false end local k = name .. "-" .. realm + if AA.db.ignored and AA.db.ignored[k] then return false end local c = AA.db.chars[k] if not c then c = { name = name, realm = realm, cds = {}, remote = true } @@ -174,6 +178,7 @@ local function ReceiveEquip(text) local _, _, name, realm, ts, body = string.find(text, "^E%^([^%^]*)%^([^%^]*)%^(%d*)%^(.*)$") if not name or name == "" then return false end local k = name .. "-" .. realm + if AA.db.ignored and AA.db.ignored[k] then return false end local c = AA.db.chars[k] if not c then c = { name = name, realm = realm, cds = {}, remote = true } @@ -201,6 +206,7 @@ local function ReceiveBags(text) string.find(text, "^B%^([^%^]*)%^([^%^]*)%^(%d*)%^(%d*)%^([^%^]*)%^(.*)$") if not name or name == "" then return false end local k = name .. "-" .. realm + if AA.db.ignored and AA.db.ignored[k] then return false end local c = AA.db.chars[k] if not c then c = { name = name, realm = realm, cds = {}, remote = true }