]> git.stg.codes - stg.git/blobdiff - projects/stargazer/plugins/configuration/sgconfig/parser_admin.cpp
Fixed compilation issues.
[stg.git] / projects / stargazer / plugins / configuration / sgconfig / parser_admin.cpp
index 5bc68d2adf36ace7769e4e167de59a708239589a..b1285a772441d3facc49cd96937c05f11ba9c24d 100644 (file)
@@ -37,7 +37,7 @@ if (!priv->adminChg)
     return;
     }
 
-string s;
+std::string s;
 //answerList->clear();
 answerList->erase(answerList->begin(), answerList->end());
 
@@ -99,7 +99,7 @@ if (admins->Del(adminToDel, currAdmin) == 0)
     }
 else
     {
-    string s;
+    std::string s;
     strprintf(&s, "<DelAdmin Result=\"Error. %s\"/>", admins->GetStrError().c_str());
     answerList->push_back(s);
     }
@@ -155,7 +155,7 @@ if (admins->Add(adminToAdd, currAdmin) == 0)
     }
 else
     {
-    string s;
+    std::string s;
     strprintf(&s, "<AddAdmin Result=\"Error. %s\"/>", admins->GetStrError().c_str());
     answerList->push_back(s);
     }
@@ -213,11 +213,11 @@ void PARSER_CHG_ADMIN::CreateAnswer()
 answerList->erase(answerList->begin(), answerList->end());
 
 
-if (!login.res_empty())
+if (!login.empty())
     {
     ADMIN * origAdmin = NULL;
 
-    if (admins->Find(login, &origAdmin))
+    if (admins->Find(login.data(), &origAdmin))
         {
         answerList->push_back(std::string("<ChgAdmin Result = \"Admin '") + login.data() + "' is not found.\"/>");
         return;
@@ -225,10 +225,10 @@ if (!login.res_empty())
 
     ADMIN_CONF conf(origAdmin->GetConf());
 
-    if (!password.res_empty())
+    if (!password.empty())
         conf.password = password.data();
 
-    if (!privAsString.res_empty())
+    if (!privAsString.empty())
         {
         int p = 0;
         if (str2x(privAsString.data().c_str(), p) < 0)
@@ -242,7 +242,7 @@ if (!login.res_empty())
 
     if (admins->Change(conf, currAdmin) != 0)
         {
-        string s;
+        std::string s;
         strprintf(&s, "<ChgAdmin Result = \"%s\"/>", admins->GetStrError().c_str());
         answerList->push_back(s);
         }