mirror of
https://github.com/Lacustat/Freewood-OctoWoW-Mail.git
synced 2026-11-06 08:58:57 +00:00
0.1.161: Brett-Briefe mit Kennung, gruene Darstellung, Mail-Pflicht fuer Brief-Auftraege, doppelte Abfrage, Knopf-Reihen ohne Ueberlappung
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016onJCSHLwhs9udhC9ZLzk9
This commit is contained in:
@@ -364,6 +364,35 @@ function Mail:RemoveMail(m)
|
||||
return true, own and "own" or "archived"
|
||||
end
|
||||
|
||||
-- Kennung der Brett-Briefe (vom Freewood-Briefkasten geschrieben): gruen darstellen
|
||||
local GREEN = "|cff6cc070"
|
||||
function Mail.IsBoardSubject(s)
|
||||
local tag = "[Brett] "
|
||||
return type(s) == "string" and s:sub(1, #tag) == tag
|
||||
end
|
||||
function Mail.ColorSubject(s)
|
||||
s = tostring(s or "")
|
||||
if Mail.IsBoardSubject(s) then return GREEN .. "[Brett]|r " .. s:sub(9) end
|
||||
return s
|
||||
end
|
||||
function Mail.ColorBody(text)
|
||||
text = tostring(text or "")
|
||||
if text:sub(1, 16) ~= "[Freewood Brett]" then return text end
|
||||
local out, data, first = {}, false, true
|
||||
for line in (text .. "\n"):gmatch("(.-)\n") do
|
||||
if first then
|
||||
first = false
|
||||
out[#out + 1] = GREEN .. FW.L.MAIL_BOARD_TAG .. "|r"
|
||||
elseif not data and not line:find("FW%d+:") then
|
||||
out[#out + 1] = GREEN .. line .. "|r"
|
||||
else
|
||||
data = true
|
||||
out[#out + 1] = line
|
||||
end
|
||||
end
|
||||
return table.concat(out, "\n")
|
||||
end
|
||||
|
||||
-- Brett-Brief: Ein Brett-Auftrag bereitet einen Brief vor (Creator befuellt das verdeckte Briefformular).
|
||||
-- Mit ersetztem Briefkasten zeigt unser Fenster den Stand und sendet selbst, sobald alles stimmt.
|
||||
function Mail.BoardLetter()
|
||||
|
||||
Reference in New Issue
Block a user