You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ifnothasObjectPermissionTo( client, "general.tab_acl" ) then
260
+
outputServerLog( ( "[ADMIN SECURITY]: Player %s [%s %s] attempted to tamper with server ACL without proper rights" ):format( client.name, client.ip, client.serial ) )
Copy file name to clipboardExpand all lines: [admin]/admin2/server/admin_sync.lua
+63-1Lines changed: 63 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -7,17 +7,38 @@
7
7
* Original File by lil_Toady
8
8
*
9
9
**************************************]]
10
+
11
+
localfunctionhasClientPermissionTo(strRight)
12
+
ifclientandnothasObjectPermissionTo(client, strRight) then
13
+
outputServerLog( ( "[ADMIN SECURITY]: Player %s [%s %s] attempted to perform admin data sync without proper rights (%s)" ):format( client.name, client.ip, client.serial, strRight ) )
14
+
returnfalse
15
+
end
16
+
returntrue
17
+
end
18
+
10
19
addEvent(EVENT_SYNC, true)
11
20
addEventHandler(
12
21
EVENT_SYNC,
13
22
root,
14
23
function(type, data)
24
+
25
+
ifnothasClientPermissionTo("general.adminpanel") then
26
+
return
27
+
end
28
+
15
29
localtableOut= {}
16
30
localtheSource=root
31
+
17
32
if (type==SYNC_PLAYER) then
33
+
18
34
if (notisElement(data)) then
19
35
return
20
36
end
37
+
38
+
ifnothasClientPermissionTo( "general.tab_players" ) then
39
+
return
40
+
end
41
+
21
42
aPlayers[client]["sync"] =data
22
43
tableOut["mute"] =isPlayerMuted(data)
23
44
tableOut["freeze"] =isElementFrozen(data)
@@ -33,6 +54,7 @@ addEventHandler(
33
54
end
34
55
tableOut["account"] =getAccountName(account)
35
56
theSource=data
57
+
36
58
elseif (type==SYNC_PLAYERS) then
37
59
forid, playerinipairs(getElementsByType("player")) do
0 commit comments