X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/46b0747592074017ff0ea4b33d4a7194235886e5..611c8051a2ae58a1c306675c8250865e12563834:/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 0db867bb..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) @@ -57,7 +59,7 @@ void GET_ADMINS::CreateAnswer() (ac.priv.userAddDel << 8) + (ac.priv.adminChg << 10) + (ac.priv.tariffChg << 12); - m_answer += ""; + m_answer += ""; } m_admins.CloseSearch(h); m_answer += ""; @@ -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)