mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-29 20:16:38 +09:00
Cleaned Config
This commit is contained in:
13
config/expcore/command_auth_roles.lua
Normal file
13
config/expcore/command_auth_roles.lua
Normal file
@@ -0,0 +1,13 @@
|
||||
--- This will make commands only work if the role has been allowed it in the role config
|
||||
-- @config Commands-Auth-Roles
|
||||
|
||||
local Commands = require 'expcore.commands' --- @dep expcore.commands
|
||||
local Roles = require 'expcore.roles' --- @dep expcore.roles
|
||||
|
||||
Commands.add_authenticator(function(player,command,tags,reject)
|
||||
if Roles.player_allowed(player,'command/'..command) then
|
||||
return true
|
||||
else
|
||||
return reject()
|
||||
end
|
||||
end)
|
||||
Reference in New Issue
Block a user