]> git.stg.codes - stg.git/blobdiff - projects/stargazer/users_impl.cpp
Get<something>Num -> Count
[stg.git] / projects / stargazer / users_impl.cpp
index 3eee9a9a5cb99ff5ccfcb52071f8b0a765560da5..5ad112b9523aae65158d8aaebf0c9545a5ea45c5 100644 (file)
@@ -53,7 +53,8 @@ extern const volatile time_t stgTime;
 
 //-----------------------------------------------------------------------------
 USERS_IMPL::USERS_IMPL(SETTINGS_IMPL * s, STORE * st, TARIFFS * t, const ADMIN * sa)
-    : users(),
+    : USERS(),
+      users(),
       usersToDelete(),
       userIPNotifiersBefore(),
       userIPNotifiersAfter(),
@@ -274,7 +275,7 @@ usersList.clear();
 if (store->GetUsersList(&usersList) < 0)
     {
     WriteServLog(store->GetStrError().c_str());
-    exit(1);
+    return -1;
     }
 
 user_iter ui;
@@ -458,7 +459,7 @@ if (t1.tm_mday == dayResetTraff)
     {
     printfd(__FILE__, "ResetTraff\n");
     for_each(users.begin(), users.end(), mem_fun_ref(&USER_IMPL::ProcessNewMonth));
-    for_each(users.begin(), users.end(), mem_fun_ref(&USER_IMPL::SetPrepaidTraff));
+    //for_each(users.begin(), users.end(), mem_fun_ref(&USER_IMPL::SetPrepaidTraff));
     }
 }
 //-----------------------------------------------------------------------------
@@ -560,11 +561,6 @@ while (iter != usersToDelete.end())
 return;
 }
 //-----------------------------------------------------------------------------
-int USERS_IMPL::GetUserNum() const
-{
-return users.size();
-}
-//-----------------------------------------------------------------------------
 void USERS_IMPL::AddToIPIdx(user_iter user)
 {
 printfd(__FILE__, "USERS: Add IP Idx\n");