X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/44f946bf4726800b7229f7c688c626fde469210b..669bf62b01b121a3c9fc5092cd9d2ab3392fd92c:/projects/sgconf/admins.cpp?ds=sidebyside diff --git a/projects/sgconf/admins.cpp b/projects/sgconf/admins.cpp index 739a8aef..7161e1ef 100644 --- a/projects/sgconf/admins.cpp +++ b/projects/sgconf/admins.cpp @@ -154,7 +154,6 @@ bool AddAdminFunction(const SGCONF::CONFIG & config, const std::string & arg, const std::map & options) { -// TODO ADMIN_CONF_RES conf; conf.login = arg; SGCONF::MaybeSet(options, "priv", conf.priv, ConvPriv); @@ -170,9 +169,15 @@ bool ChgAdminFunction(const SGCONF::CONFIG & config, const std::string & arg, const std::map & options) { -// TODO -std::cerr << "Unimplemented.\n"; -return false; +ADMIN_CONF_RES conf; +conf.login = arg; +SGCONF::MaybeSet(options, "priv", conf.priv, ConvPriv); +SGCONF::MaybeSet(options, "password", conf.password); +STG::SERVCONF proto(config.server.data(), + config.port.data(), + config.userName.data(), + config.userPass.data()); +return proto.ChgAdmin(conf, SimpleCallback, NULL) == STG::st_ok; } } // namespace anonymous