X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/af9452155f0892e1d2862efad4a87861ca60867d..87bf949d1f8b8a86716c5880244df95b39f67708:/stargazer/plugins/configuration/sgconfig/parser_admins.cpp diff --git a/stargazer/plugins/configuration/sgconfig/parser_admins.cpp b/stargazer/plugins/configuration/sgconfig/parser_admins.cpp index f3a9aa31..0e390ffd 100644 --- a/stargazer/plugins/configuration/sgconfig/parser_admins.cpp +++ b/stargazer/plugins/configuration/sgconfig/parser_admins.cpp @@ -22,6 +22,8 @@ #include "parser_admins.h" #include "stg/admins.h" +#include "stg/admin.h" +#include "stg/admin_conf.h" #include // strcasecmp @@ -37,7 +39,7 @@ const char * CHG_ADMIN::tag = "ChgAdmin"; void GET_ADMINS::CreateAnswer() { - const PRIV * priv = m_currAdmin.GetPriv(); + const auto priv = m_currAdmin.GetPriv(); if (!priv->adminChg) { m_answer = ""; @@ -45,7 +47,7 @@ void GET_ADMINS::CreateAnswer() } m_answer = ""; - ADMIN_CONF ac; + AdminConf ac; int h = m_admins.OpenSearch(); while (m_admins.SearchNext(h, &ac) == 0) @@ -137,7 +139,7 @@ void CHG_ADMIN::CreateAnswer() { if (!login.empty()) { - ADMIN * origAdmin = NULL; + Admin * origAdmin = NULL; if (m_admins.Find(login, &origAdmin)) { @@ -145,7 +147,7 @@ void CHG_ADMIN::CreateAnswer() return; } - ADMIN_CONF conf(origAdmin->GetConf()); + AdminConf conf(origAdmin->GetConf()); if (!password.empty()) conf.password = password.data(); @@ -159,7 +161,7 @@ void CHG_ADMIN::CreateAnswer() return; } - conf.priv.FromInt(p); + conf.priv = Priv(p); } if (m_admins.Change(conf, &m_currAdmin) != 0)