]> git.stg.codes - stg.git/blobdiff - projects/stargazer/plugins/configuration/rpcconfig/users_methods.cpp
Trailing coma removed
[stg.git] / projects / stargazer / plugins / configuration / rpcconfig / users_methods.cpp
index 0c28c60bfa2aaba30836e3165663bb5b397ea39f..4932e146ccfefce2d89428e3ef9de3c89297a931 100644 (file)
@@ -1,17 +1,16 @@
 #include <cerrno>
 
-#include "users_methods.h"
-
-#include "users.h"
-#include "admins.h"
-#include "tariffs.h"
+#include "stg/users.h"
+#include "stg/admins.h"
+#include "stg/tariffs.h"
+#include "stg/user_ips.h"
+#include "stg/common.h"
+#include "stg/user_property.h"
 
+#include "users_methods.h"
 #include "rpcconfig.h"
 #include "user_helper.h"
-#include "user_ips.h"
 #include "utils.h"
-#include "common.h"
-#include "user_property.h"
 
 //------------------------------------------------------------------------------
 
@@ -73,7 +72,7 @@ if (config->GetAdminInfo(cookie, &adminInfo))
 
 ADMIN * admin = NULL;
 
-if (admins->FindAdmin(adminInfo.admin, &admin))
+if (admins->Find(adminInfo.admin, &admin))
     {
     *retvalPtr = xmlrpc_c::value_boolean(false);
     return;
@@ -117,7 +116,7 @@ if (config->GetAdminInfo(cookie, &adminInfo))
 
 ADMIN * admin;
 
-if (admins->FindAdmin(adminInfo.admin, &admin))
+if (admins->Find(adminInfo.admin, &admin))
     {
     *retvalPtr = xmlrpc_c::value_boolean(false);
     return;
@@ -209,7 +208,7 @@ if (config->GetAdminInfo(cookie, &adminInfo))
 
 ADMIN * admin;
 
-if (admins->FindAdmin(adminInfo.admin, &admin))
+if (admins->Find(adminInfo.admin, &admin))
     {
     *retvalPtr = xmlrpc_c::value_boolean(false);
     return;
@@ -262,7 +261,7 @@ if (config->GetAdminInfo(cookie, &adminInfo))
 
 ADMIN * admin;
 
-if (admins->FindAdmin(adminInfo.admin, &admin))
+if (admins->Find(adminInfo.admin, &admin))
     {
     *retvalPtr = xmlrpc_c::value_boolean(false);
     return;
@@ -312,7 +311,7 @@ if (config->GetAdminInfo(cookie, &adminInfo))
 
 ADMIN * admin;
 
-if (admins->FindAdmin(adminInfo.admin, &admin))
+if (admins->Find(adminInfo.admin, &admin))
     {
     *retvalPtr = xmlrpc_c::value_boolean(false);
     return;
@@ -360,7 +359,7 @@ if (config->GetAdminInfo(cookie, &adminInfo))
 
 ADMIN * admin;
 
-if (admins->FindAdmin(adminInfo.admin, &admin))
+if (admins->Find(adminInfo.admin, &admin))
     {
     *retvalPtr = xmlrpc_c::value_boolean(false);
     return;
@@ -395,6 +394,7 @@ if (tariffs->FindByName(tariff))
                                             login,
                                             store))
             {
+            u->ResetNextTariff();
             u->WriteConf();
             *retvalPtr = xmlrpc_c::value_boolean(true);
             return;