0.1.236: Kanaele: Mitglieder = Serverliste plus Schreibende der letzten 30 Min, offener Kanal alle 45 s neu abgefragt [ungeprueft]

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016onJCSHLwhs9udhC9ZLzk9
This commit is contained in:
Lacustat
2026-11-02 01:13:54 +01:00
co-authored by Claude Sonnet 5.5
parent 6c4bcb3e83
commit 7b53e1b963
3 changed files with 70 additions and 16 deletions
+12 -1
View File
@@ -1166,7 +1166,7 @@ local function Build(content)
if en.kind == "channel" and en.e then
local k = 1
while k <= table.getn(en.e.members) do
out[table.getn(out) + 1] = { name = en.e.members[k] }
out[table.getn(out) + 1] = { name = en.e.members[k], spk = en.e.extra and en.e.extra[en.e.members[k]] or nil }
k = k + 1
end
elseif en.kind == "guild" then
@@ -1216,6 +1216,7 @@ local function Build(content)
if (not cls or not lv) and not (en and en.mode == "data") and search == "" then CL.Ask(nm, false, true) end
SetClassIcon(r.icon, cls)
local cr, cg, cb = CL.ClassColor(cls)
if it.spk then cr, cg, cb = cr * 0.65, cg * 0.65, cb * 0.65 end
local txt = Hex(cr, cg, cb) .. nm .. "|r"
if lv then txt = txt .. " |cff9a978c" .. lv .. "|r" end
if it.extra then txt = txt .. " |cff9a978c" .. it.extra .. "|r" end
@@ -1311,12 +1312,22 @@ local function Build(content)
end)
local acc = 0
local lastAuto = 0
f:SetScript("OnUpdate", function(_, el)
acc = acc + (el or arg1 or 0)
if acc < 0.4 then return end
acc = 0
if not f:IsShown() then return end
if Ch.dirty then Ch.dirty = nil; Ch.RefreshAll() end
-- den angezeigten Kanal alle 45 s neu abfragen
local cur = selKey and EntryByKey(selKey)
if cur and cur.kind == "channel" and cur.mode ~= "data" and Ch.Pending() == 0 then
local now = (GetTime and GetTime()) or 0
if now - lastAuto >= 45 then
lastAuto = now
Ch.RefreshOne(cur.num)
end
end
local w = chat.child:GetWidth()
if seen.cl ~= CL.version or seen.ch ~= Ch.version or (w and math.abs(w - seen.w) > 4) then
Redraw()