]> git.stg.codes - stg.git/blobdiff - projects/stargazer/plugins/configuration/rpcconfig/users_methods.cpp
+tch from SpiderX <spiderx@spiderx.dp.ua> - rscriptd.conf
[stg.git] / projects / stargazer / plugins / configuration / rpcconfig / users_methods.cpp
index 4932e146ccfefce2d89428e3ef9de3c89297a931..130051be91d43a8f26871506e4098ed5deff8ec9 100644 (file)
@@ -10,7 +10,6 @@
 #include "users_methods.h"
 #include "rpcconfig.h"
 #include "user_helper.h"
-#include "utils.h"
 
 //------------------------------------------------------------------------------
 
@@ -19,7 +18,6 @@ void METHOD_USER_GET::execute(xmlrpc_c::paramList const & paramList,
 {
 std::string cookie = paramList.getString(0);
 std::string login = paramList.getString(1);
-std::string enc;
 paramList.verifyEnd(2);
 
 std::map<std::string, xmlrpc_c::value> structVal;
@@ -59,7 +57,6 @@ void METHOD_USER_ADD::execute(xmlrpc_c::paramList const & paramList,
 {
 std::string cookie = paramList.getString(0);
 std::string login = paramList.getString(1);
-std::string enc;
 paramList.verifyEnd(2);
 
 ADMIN_INFO adminInfo;
@@ -103,7 +100,6 @@ void METHOD_USER_DEL::execute(xmlrpc_c::paramList const & paramList,
 {
 std::string cookie = paramList.getString(0);
 std::string login = paramList.getString(1);
-std::string enc;
 paramList.verifyEnd(2);
 
 ADMIN_INFO adminInfo;
@@ -141,7 +137,6 @@ void METHOD_USERS_GET::execute(xmlrpc_c::paramList const & paramList,
                                xmlrpc_c::value *   const   retvalPtr)
 {
 std::string cookie = paramList.getString(0);
-std::string enc;
 paramList.verifyEnd(1);
 
 std::map<std::string, xmlrpc_c::value> structVal;
@@ -195,7 +190,6 @@ void METHOD_USER_CHG::execute(xmlrpc_c::paramList const & paramList,
 std::string cookie = paramList.getString(0);
 std::string login = paramList.getString(1);
 xmlrpc_c::value_struct info(paramList.getStruct(2));
-std::string enc;
 paramList.verifyEnd(3);
 
 ADMIN_INFO adminInfo;
@@ -248,7 +242,6 @@ std::string cookie = paramList.getString(0);
 std::string login = paramList.getString(1);
 double amount = paramList.getDouble(2);
 std::string comment = IconvString(paramList.getString(3), "UTF-8", "KOI8-R");
-std::string enc;
 paramList.verifyEnd(4);
 
 ADMIN_INFO adminInfo;
@@ -298,7 +291,6 @@ std::string cookie = paramList.getString(0);
 std::string login = paramList.getString(1);
 double cash = paramList.getDouble(2);
 std::string comment = IconvString(paramList.getString(3), "UTF-8", "KOI8-R");
-std::string enc;
 paramList.verifyEnd(4);
 
 ADMIN_INFO adminInfo;
@@ -346,7 +338,6 @@ std::string login = paramList.getString(1);
 std::string tariff = paramList.getString(2);
 bool delayed = paramList.getBoolean(3);
 std::string comment = IconvString(paramList.getString(4), "UTF-8", "KOI8-R");
-std::string enc;
 paramList.verifyEnd(5);
 
 ADMIN_INFO adminInfo;
@@ -380,7 +371,8 @@ if (tariffs->FindByName(tariff))
         if (u->GetProperty().nextTariff.Set(tariff,
                                             admin,
                                             login,
-                                            store))
+                                            store,
+                                            comment))
             {
             u->WriteConf();
             *retvalPtr = xmlrpc_c::value_boolean(true);
@@ -392,7 +384,8 @@ if (tariffs->FindByName(tariff))
         if (u->GetProperty().tariffName.Set(tariff,
                                             admin,
                                             login,
-                                            store))
+                                            store,
+                                            comment))
             {
             u->ResetNextTariff();
             u->WriteConf();