Files
factorio-scenario-ExpCluster/config/expcore-commands/auth_roles.lua
Cooldude2606 9ecd0cca0d Config
2019-07-23 17:46:49 +01:00

13 lines
443 B
Lua

--- 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)