diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/config.cpp | 2 | ||||
| -rw-r--r-- | src/config.hpp | 1 | ||||
| -rw-r--r-- | src/main.cpp | 6 |
3 files changed, 7 insertions, 2 deletions
diff --git a/src/config.cpp b/src/config.cpp index 1a11f0b..45209e4 100644 --- a/src/config.cpp +++ b/src/config.cpp @@ -38,6 +38,8 @@ namespace bot { cfg.bot_username = value; } else if (key == "bot_password") { cfg.bot_password = value; + } else if (key == "bot_client_id") { + cfg.bot_client_id = value; } else if (key == "db_name") { db_cfg.name = value; } else if (key == "db_user") { diff --git a/src/config.hpp b/src/config.hpp index 2e02f1d..afdf396 100644 --- a/src/config.hpp +++ b/src/config.hpp @@ -20,6 +20,7 @@ namespace bot { struct Configuration { std::string bot_username; std::string bot_password; + std::string bot_client_id; DatabaseConfiguration database; }; diff --git a/src/main.cpp b/src/main.cpp index f9be192..d617769 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -23,8 +23,10 @@ int main(int argc, char *argv[]) { bot::Configuration cfg = o_cfg.value(); - if (cfg.bot_password.empty() || cfg.bot_username.empty()) { - std::cerr << "*** BOT_USERNAME and BOT_PASSWORD must be set!\n"; + if (cfg.bot_password.empty() || cfg.bot_username.empty() || + cfg.bot_client_id.empty()) { + std::cerr + << "*** BOT_USERNAME, BOT_CLIENT_ID and BOT_PASSWORD must be set!\n"; return -1; } |
