diff options
| author | ilotterytea <iltsu@alright.party> | 2024-05-07 00:23:22 +0500 |
|---|---|---|
| committer | ilotterytea <iltsu@alright.party> | 2024-05-07 00:23:22 +0500 |
| commit | 08714a202d0eff3dfd31a4b0dd7f3311b0fd3f0e (patch) | |
| tree | efadb1672e8c1b0a8aaaac989e8014b9ec26d5b8 /src/config.cpp | |
| parent | 9069514f8425932ef998fc8a80b514eb81c88025 (diff) | |
upd: struct for twitch credentials
Diffstat (limited to 'src/config.cpp')
| -rw-r--r-- | src/config.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/config.cpp b/src/config.cpp index 45209e4..3af6e24 100644 --- a/src/config.cpp +++ b/src/config.cpp @@ -19,6 +19,7 @@ namespace bot { } Configuration cfg; + TwitchCredentialsConfiguration ttv_crd_cfg; DatabaseConfiguration db_cfg; std::string line; @@ -34,12 +35,10 @@ namespace bot { c = tolower(c); } - if (key == "bot_username") { - cfg.bot_username = value; - } else if (key == "bot_password") { - cfg.bot_password = value; - } else if (key == "bot_client_id") { - cfg.bot_client_id = value; + if (key == "twitch_credentials.client_id") { + ttv_crd_cfg.client_id = value; + } else if (key == "twitch_credentials.token") { + ttv_crd_cfg.token = value; } else if (key == "db_name") { db_cfg.name = value; } else if (key == "db_user") { @@ -53,6 +52,7 @@ namespace bot { } } + cfg.twitch_credentials = ttv_crd_cfg; cfg.database = db_cfg; return cfg; |
