From b192808a6782e2ad91e487065ddce5dacbb6b1ec Mon Sep 17 00:00:00 2001 From: Michael Mandl Date: Fri, 30 Mar 2018 21:22:39 +0200 Subject: [PATCH] moved config file parameters to [Telegram] section --- BeezleBot/settings.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/BeezleBot/settings.cpp b/BeezleBot/settings.cpp index 97e8bfa..15684c7 100644 --- a/BeezleBot/settings.cpp +++ b/BeezleBot/settings.cpp @@ -34,13 +34,16 @@ Settings::Settings(int argc, char **argv) po::options_description fileOptions; fileOptions.add_options() - ("token", po::value(&token)) - ("users", po::value>(&users)->multitoken()) + ("Telegram.token", po::value(&token)) + ("Telegram.users", po::value>(&users)->multitoken()) ; try { po::store(po::parse_config_file(configFile, fileOptions), configuredOptions); + + configuredOptions.insert({ "token", configuredOptions["Telegram.token"] }); + configuredOptions.insert({ "users", configuredOptions["Telegram.users"] }); } catch (po::unknown_option &e) {