diff options
Diffstat (limited to 'bot/src/commands/lua.hpp')
| -rw-r--r-- | bot/src/commands/lua.hpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/bot/src/commands/lua.hpp b/bot/src/commands/lua.hpp index 2f236f2..1a1c9f9 100644 --- a/bot/src/commands/lua.hpp +++ b/bot/src/commands/lua.hpp @@ -97,7 +97,8 @@ namespace bot::command::lua { command::Response run(const InstanceBundle& bundle, const command::Request& request) const override { - if (!bundle.configuration.lua.allow_arbitrary_scripts) { + if (!bundle.configuration.lua.allow_arbitrary_scripts && + request.requester.user_rights.get_level() < schemas::TRUSTED) { throw ResponseException<ResponseError::ILLEGAL_COMMAND>( request, bundle.localization); } @@ -126,6 +127,7 @@ namespace bot::command::lua { } if (!bundle.configuration.lua.allow_arbitrary_scripts && + request.requester.user_rights.get_level() < schemas::TRUSTED && !std::any_of(bundle.configuration.lua.script_whitelist.begin(), bundle.configuration.lua.script_whitelist.end(), [&request](const std::string& i) { |
