Skip to content

Commit 5c18d7c

Browse files
committed
xd
1 parent cd82242 commit 5c18d7c

File tree

3 files changed

+23
-5
lines changed

3 files changed

+23
-5
lines changed

gamemode/core/libraries/loader.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -553,6 +553,7 @@ function GM:OnReloaded()
553553
lia.faction.formatModelData()
554554
if SERVER then
555555
lia.config.send()
556+
lia.administrator.sync()
556557
else
557558
lia.option.load()
558559
lia.keybind.load()

gamemode/modules/administration/submodules/permissions/libraries/server.lua

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,21 +22,38 @@ function GM:PlayerSpawnProp(client, model)
2222
end
2323

2424
function GM:CanProperty(client, property, entity)
25+
print("[TEST] CanProperty called with client:", client, "property:", property, "entity:", entity)
2526
if restrictedProperties[property] then
27+
print("[TEST] Property is restricted:", property)
2628
lia.log.add(client, "permissionDenied", L("useProperty", property))
2729
client:notifyLocalized("disabledFeature")
2830
return false
2931
end
3032

3133
if entity:IsWorld() and IsValid(entity) then
32-
if client:hasPrivilege("canPropertyWorldEntities") then return true end
34+
print("[TEST] Entity is world and valid.")
35+
if client:hasPrivilege("canPropertyWorldEntities") then
36+
print("[TEST] Client has canPropertyWorldEntities privilege.")
37+
return true
38+
end
39+
40+
print("[TEST] Client does NOT have canPropertyWorldEntities privilege.")
3341
lia.log.add(client, "permissionDenied", L("modifyWorldProperty", property))
3442
client:notifyLocalized("noModifyWorldEntities")
3543
return false
3644
end
3745

38-
if entity:GetCreator() == client and (property == "remover" or property == "collision") then return true end
39-
if client:hasPrivilege("property_" .. property) and client:isStaffOnDuty() then return true end
46+
if entity:GetCreator() == client and (property == "remover" or property == "collision") then
47+
print("[TEST] Client is creator and property is remover or collision.")
48+
return true
49+
end
50+
51+
if client:hasPrivilege("property_" .. property) and client:isStaffOnDuty() then
52+
print("[TEST] Client has property privilege and is staff on duty.")
53+
return true
54+
end
55+
56+
print("[TEST] Client does NOT have permission to modify property:", property)
4057
lia.log.add(client, "permissionDenied", L("modifyProperty", property))
4158
client:notifyLocalized("noModifyProperty")
4259
return false

gamemode/shared.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
GM.Name = "Lilia"
2-
GM.version = 6.472
1+
GM.Name = "Lilia"
2+
GM.version = 7.732
33
GM.Author = "Samael"
44
GM.Website = "https://discord.gg/esCRH5ckbQ"
55
include("core/libraries/loader.lua")

0 commit comments

Comments
 (0)