diff options
| author | ilotterytea <iltsu@alright.party> | 2025-12-01 20:51:32 +0500 |
|---|---|---|
| committer | ilotterytea <iltsu@alright.party> | 2025-12-01 20:51:32 +0500 |
| commit | 638622d66dbe58ff96b7d1c2c6ec4b040b27da6d (patch) | |
| tree | 2f04c3b26a320f4abf5927edc5af34716e42b970 /bot/src/config.hpp | |
| parent | 0d36a1ee88fb7aedf5b33af7ac95140b002c5a64 (diff) | |
feat: switch for lua scripts
Diffstat (limited to 'bot/src/config.hpp')
| -rw-r--r-- | bot/src/config.hpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/bot/src/config.hpp b/bot/src/config.hpp index 1a09463..70491bd 100644 --- a/bot/src/config.hpp +++ b/bot/src/config.hpp @@ -3,6 +3,7 @@ #include <optional> #include <sol/sol.hpp> #include <string> +#include <vector> #define GET_DATABASE_CONNECTION_URL(c) \ "dbname = " + c.database.name + " user = " + c.database.user + \ @@ -63,6 +64,11 @@ namespace bot { int timeout = 60; }; + struct LuaConfiguration { + bool allow_arbitrary_scripts = false; + std::vector<std::string> script_whitelist; + }; + struct Configuration { TwitchCredentialsConfiguration twitch_credentials; KickCredentialsConfiguration kick_credentials; @@ -72,6 +78,7 @@ namespace bot { UrlConfiguration url; TokenConfiguration tokens; RssConfiguration rss; + LuaConfiguration lua; sol::table as_lua_table(std::shared_ptr<sol::state> luaState) const; }; |
