mirror of
https://github.com/Lacustat/Freewood-OctoWoW-Codex.git
synced 2026-10-31 03:46:56 +00:00
0.1.139: Dev und Rechte scharf, Eigentuemer und Moderatoren eingetragen
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016onJCSHLwhs9udhC9ZLzk9
This commit is contained in:
co-authored by
Claude Sonnet 5.5
parent
e17ea437dd
commit
ef7d631fe7
@@ -132,6 +132,15 @@ end
|
||||
-- Abfragen
|
||||
------------------------------------------------------------------------
|
||||
|
||||
local function ModeratorKeys()
|
||||
local set = {}
|
||||
for _, n in ipairs(NS.Moderators or {}) do
|
||||
local k = Trust.EntryKey(n)
|
||||
if k then set[k] = true end
|
||||
end
|
||||
return set
|
||||
end
|
||||
|
||||
function Trust.IsOwner(name)
|
||||
local k = Trust.Key(name)
|
||||
return k ~= nil and OwnerKeys()[k] == true
|
||||
@@ -148,6 +157,7 @@ function Trust.RoleOf(name)
|
||||
local entry = Data().list[k]
|
||||
if entry and entry.role == "blocked" then return "blocked" end
|
||||
if OwnerKeys()[k] then return "owner" end
|
||||
if ModeratorKeys()[k] then return "moderator" end
|
||||
return entry and entry.role or nil
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user