summaryrefslogtreecommitdiff
path: root/src/config.cpp
diff options
context:
space:
mode:
authorilotterytea <iltsu@alright.party>2024-05-08 22:05:21 +0500
committerilotterytea <iltsu@alright.party>2024-05-08 22:05:21 +0500
commit3a1e75ab3767139de0f381a04c44e92bb0d947de (patch)
tree9de712a1ce2d5ddefed6037b7fba03587aca30ec /src/config.cpp
parent08714a202d0eff3dfd31a4b0dd7f3311b0fd3f0e (diff)
feat: new placeholder
Diffstat (limited to 'src/config.cpp')
-rw-r--r--src/config.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/config.cpp b/src/config.cpp
index 3af6e24..d5a3f1d 100644
--- a/src/config.cpp
+++ b/src/config.cpp
@@ -21,6 +21,7 @@ namespace bot {
Configuration cfg;
TwitchCredentialsConfiguration ttv_crd_cfg;
DatabaseConfiguration db_cfg;
+ CommandConfiguration cmd_cfg;
std::string line;
while (std::getline(ifs, line, '\n')) {
@@ -50,8 +51,15 @@ namespace bot {
} else if (key == "db_port") {
db_cfg.port = value;
}
+
+ else if (key == "commands.join_allowed") {
+ cmd_cfg.join_allowed = std::stoi(value);
+ } else if (key == "commands.join_allow_from_other_chats") {
+ cmd_cfg.join_allow_from_other_chats = std::stoi(value);
+ }
}
+ cfg.commands = cmd_cfg;
cfg.twitch_credentials = ttv_crd_cfg;
cfg.database = db_cfg;