Compare commits
No commits in common. "master" and "1.1-coa.1" have entirely different histories.
5 changed files with 9 additions and 124 deletions
|
|
@ -37,14 +37,10 @@ jobs:
|
|||
RID=$(curl -sf -X POST -H "Authorization: token $GITEA_TOKEN" \
|
||||
-H "Content-Type: application/json" \
|
||||
"$API/repos/$REPO/releases" \
|
||||
-d "$(jq -nc --arg t "$TAG" '{tag_name:$t,name:$t,draft:false,prerelease:false,hide_archive_links:true}')" \
|
||||
-d "$(jq -nc --arg t "$TAG" '{tag_name:$t,name:$t,draft:false,prerelease:false}')" \
|
||||
| jq -r '.id')
|
||||
fi
|
||||
echo "release id: $RID"
|
||||
# Gitea honors hide_archive_links only on edit, not create — PATCH it
|
||||
# so the auto-generated Source Code (zip/tar.gz) links stay hidden.
|
||||
curl -sf -X PATCH -H "Authorization: token $GITEA_TOKEN" -H "Content-Type: application/json" \
|
||||
"$API/repos/$REPO/releases/$RID" -d '{"hide_archive_links":true}' >/dev/null || true
|
||||
# Upload every dist/*.zip. Per-asset failures don't fail the job —
|
||||
# we want partial releases to still publish rather than block the
|
||||
# whole pipeline on one big file.
|
||||
|
|
|
|||
|
|
@ -19,9 +19,14 @@ local options = {
|
|||
name = L["Standalone Config"],
|
||||
desc = L["Open a standalone config window. You might consider installing |cffffff00BetterBlizzOptions|r to make the Blizzard UI options panel resizable."],
|
||||
func = function()
|
||||
if InterfaceOptionsFrame then InterfaceOptionsFrame:Hide() end
|
||||
AceConfigDialog:SetDefaultSize("Chatter", 500, 550)
|
||||
AceConfigDialog:Open("Chatter")
|
||||
if InterfaceOptionsFrame and InterfaceOptionsFrame_OpenToCategory then
|
||||
InterfaceOptionsFrame:Hide()
|
||||
AceConfigDialog:SetDefaultSize("Chatter", 500, 550)
|
||||
AceConfigDialog:Open("Chatter")
|
||||
else
|
||||
AceConfigDialog:SetDefaultSize("Chatter", 500, 550)
|
||||
AceConfigDialog:Open("Chatter")
|
||||
end
|
||||
end
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,12 +4,6 @@ local AceLocale = LibStub:GetLibrary("AceLocale-3.0")
|
|||
local L = AceLocale:NewLocale("Chatter", "enUS", true)
|
||||
if not L then return end
|
||||
|
||||
-- ./Modules/BroadcastFilter.lua
|
||||
L["Broadcast Filter"] = true
|
||||
L["Hidden broadcasts"] = true
|
||||
L["Hides chat lines from broadcast channels or senders. One entry per line; matching is a case-insensitive substring against the message and its channel/sender."] = true
|
||||
L["Suppresses spammy server broadcasts such as the Ascension Autobroadcast Discord nag."] = true
|
||||
|
||||
-- ./Chatter.lua
|
||||
L["Chatter"] = true
|
||||
L["Standalone Config"] = true
|
||||
|
|
|
|||
|
|
@ -1,109 +0,0 @@
|
|||
local mod = Chatter:NewModule("Broadcast Filter", "AceEvent-3.0")
|
||||
local L = LibStub("AceLocale-3.0"):GetLocale("Chatter")
|
||||
mod.modName = L["Broadcast Filter"]
|
||||
|
||||
local ipairs = _G.ipairs
|
||||
local type = _G.type
|
||||
local select = _G.select
|
||||
local strlower = _G.string.lower
|
||||
local strfind = _G.string.find
|
||||
local gmatch = _G.string.gmatch
|
||||
local gsub = _G.string.gsub
|
||||
|
||||
-- Events the autobroadcast can arrive on. It renders as "[Ascension Autobroadcast]: ..."
|
||||
-- which is a named channel, so CHAT_MSG_CHANNEL is the primary one; SYSTEM and
|
||||
-- RAID_WARNING are belt-and-suspenders for other server broadcast styles.
|
||||
local events = {
|
||||
"CHAT_MSG_CHANNEL",
|
||||
"CHAT_MSG_CHANNEL_NOTICE",
|
||||
"CHAT_MSG_SYSTEM",
|
||||
"CHAT_MSG_RAID_WARNING",
|
||||
}
|
||||
|
||||
local defaults = {
|
||||
profile = {
|
||||
patterns = "Ascension Autobroadcast",
|
||||
}
|
||||
}
|
||||
|
||||
-- Lowercased, trimmed, non-empty lines from the user's textbox.
|
||||
local activePatterns = {}
|
||||
local function rebuild()
|
||||
for i = #activePatterns, 1, -1 do activePatterns[i] = nil end
|
||||
for line in gmatch(mod.db.profile.patterns or "", "[^\r\n]+") do
|
||||
line = gsub(gsub(line, "^%s+", ""), "%s+$", "")
|
||||
if line ~= "" then activePatterns[#activePatterns + 1] = strlower(line) end
|
||||
end
|
||||
end
|
||||
|
||||
-- Returns true to suppress. For a channel message the channel name ("Ascension
|
||||
-- Autobroadcast") is not in the body but in a later arg, so scan the body and
|
||||
-- every string vararg with a case-insensitive plain substring match.
|
||||
mod.filterFunc = function(frame, event, msg, ...)
|
||||
local n = #activePatterns
|
||||
if n == 0 then return false end
|
||||
|
||||
if msg and msg ~= "" then
|
||||
local m = strlower(msg)
|
||||
for i = 1, n do
|
||||
if strfind(m, activePatterns[i], 1, true) then return true end
|
||||
end
|
||||
end
|
||||
|
||||
for i = 1, select("#", ...) do
|
||||
local v = select(i, ...)
|
||||
if type(v) == "string" and v ~= "" then
|
||||
v = strlower(v)
|
||||
for j = 1, n do
|
||||
if strfind(v, activePatterns[j], 1, true) then return true end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
return false
|
||||
end
|
||||
|
||||
local options = {
|
||||
desc = {
|
||||
order = 1,
|
||||
type = "description",
|
||||
name = L["Hides chat lines from broadcast channels or senders. One entry per line; matching is a case-insensitive substring against the message and its channel/sender."],
|
||||
},
|
||||
patterns = {
|
||||
order = 2,
|
||||
type = "input",
|
||||
multiline = 8,
|
||||
width = "full",
|
||||
name = L["Hidden broadcasts"],
|
||||
get = function() return mod.db.profile.patterns end,
|
||||
set = function(info, v)
|
||||
mod.db.profile.patterns = v
|
||||
rebuild()
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
||||
function mod:OnInitialize()
|
||||
self.db = Chatter.db:RegisterNamespace("BroadcastFilter", defaults)
|
||||
end
|
||||
|
||||
function mod:OnEnable()
|
||||
rebuild()
|
||||
for _, event in ipairs(events) do
|
||||
ChatFrame_AddMessageEventFilter(event, self.filterFunc)
|
||||
end
|
||||
end
|
||||
|
||||
function mod:OnDisable()
|
||||
for _, event in ipairs(events) do
|
||||
ChatFrame_RemoveMessageEventFilter(event, self.filterFunc)
|
||||
end
|
||||
end
|
||||
|
||||
function mod:Info()
|
||||
return L["Suppresses spammy server broadcasts such as the Ascension Autobroadcast Discord nag."]
|
||||
end
|
||||
|
||||
function mod:GetOptions()
|
||||
return options
|
||||
end
|
||||
|
|
@ -7,7 +7,6 @@
|
|||
<Script file="Modules\PlayerNames.lua" />
|
||||
<Script file="Modules\StickyChannels.lua" />
|
||||
<Script file="Modules\UrlCopy.lua" />
|
||||
<Script file="Modules\BroadcastFilter.lua" />
|
||||
<!-- <Script file="Modules\ChatLink.lua" /> //-->
|
||||
<Script file="Modules\EditBox.lua" />
|
||||
<Script file="Modules\ChatFont.lua" />
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue