@@ -235,6 +235,7 @@ function AddPermission(source, permission)
235
235
end
236
236
237
237
--- @deprecated use cfg ACEs instead
238
+ --- @diagnostic disable-next-line : deprecated
238
239
exports (' AddPermission' , AddPermission )
239
240
240
241
--- @deprecated use cfg ACEs instead
@@ -250,6 +251,8 @@ function RemovePermission(source, permission)
250
251
end
251
252
else
252
253
local hasUpdated = false
254
+
255
+ --- @diagnostic disable-next-line : deprecated
253
256
for _ , v in pairs (serverConfig .permissions ) do
254
257
if IsPlayerAceAllowed (source --[[ @as string]] , v ) then
255
258
lib .removePrincipal (' player.' .. source , ' group.' .. v )
@@ -265,6 +268,7 @@ function RemovePermission(source, permission)
265
268
end
266
269
267
270
--- @deprecated use cfg ACEs instead
271
+ --- @diagnostic disable-next-line : deprecated
268
272
exports (' RemovePermission' , RemovePermission )
269
273
270
274
-- Checking for Permission Level
@@ -285,13 +289,16 @@ function HasPermission(source, permission)
285
289
end
286
290
287
291
--- @deprecated use IsPlayerAceAllowed
292
+ --- @diagnostic disable-next-line : deprecated
288
293
exports (' HasPermission' , HasPermission )
289
294
290
295
--- @deprecated use cfg ACEs instead
291
296
--- @param source Source
292
297
--- @return table<string , boolean>
293
298
function GetPermission (source )
294
299
local perms = {}
300
+
301
+ --- @diagnostic disable-next-line : deprecated
295
302
for _ , v in pairs (serverConfig .permissions ) do
296
303
if IsPlayerAceAllowed (source --[[ @as string]] , v ) then
297
304
perms [v ] = true
@@ -301,6 +308,7 @@ function GetPermission(source)
301
308
end
302
309
303
310
--- @deprecated use cfg ACEs instead
311
+ --- @diagnostic disable-next-line : deprecated
304
312
exports (' GetPermission' , GetPermission )
305
313
306
314
-- Opt in or out of admin reports
@@ -407,16 +415,15 @@ exports('GetCoreVersion', GetCoreVersion)
407
415
--- @param origin string reason
408
416
local function ExploitBan (playerId , origin )
409
417
local name = GetPlayerName (playerId )
410
- local success , errorResult = pcall (
411
- storage .insertBan ({
412
- name = name ,
413
- license = GetPlayerIdentifierByType (playerId --[[ @as string]] , ' license2' ) or GetPlayerIdentifierByType (playerId --[[ @as string]] , ' license' ),
414
- discordId = GetPlayerIdentifierByType (playerId --[[ @as string]] , ' discord' ),
415
- ip = GetPlayerIdentifierByType (playerId --[[ @as string]] , ' ip' ),
416
- reason = origin ,
417
- expiration = 2147483647 ,
418
- bannedBy = ' Anti Cheat'
419
- }))
418
+ local success , errorResult = storage .insertBan ({
419
+ name = name ,
420
+ license = GetPlayerIdentifierByType (playerId --[[ @as string]] , ' license2' ) or GetPlayerIdentifierByType (playerId --[[ @as string]] , ' license' ),
421
+ discordId = GetPlayerIdentifierByType (playerId --[[ @as string]] , ' discord' ),
422
+ ip = GetPlayerIdentifierByType (playerId --[[ @as string]] , ' ip' ),
423
+ reason = origin ,
424
+ expiration = 2147483647 ,
425
+ bannedBy = ' Anti Cheat'
426
+ })
420
427
if not success then lib .print .error (errorResult ) end
421
428
DropPlayer (playerId --[[ @as string]] , locale (' info.exploit_banned' , serverConfig .discord ))
422
429
logger .log ({
0 commit comments