]> git.stg.codes - stg.git/blobdiff - projects/stargazer/users_impl.cpp
Implemented daily fee charge with backward compatibility.
[stg.git] / projects / stargazer / users_impl.cpp
index 61ee90ff7e0ad6379f2f9faed6a3d1c7c4c10d74..dfcc556fbf87726ae1e1a20986e7b4d601b68928 100644 (file)
@@ -359,7 +359,7 @@ sigfillset(&signalSet);
 pthread_sigmask(SIG_BLOCK, &signalSet, NULL);
 
 printfd(__FILE__, "=====================| pid: %d |===================== \n", getpid());
-USERS_IMPL * us = (USERS_IMPL*) d;
+USERS_IMPL * us = static_cast<USERS_IMPL *>(d);
 
 struct tm t;
 time_t tt = stgTime;
@@ -497,6 +497,8 @@ else
         }
     }
 
+std::for_each(users.begin(), users.end(), std::mem_fun_ref(&USER_IMPL::ProcessDailyFee));
+
 if (settings->GetDayFeeIsLastDay())
     {
     printfd(__FILE__, "DayResetTraff - 2 -\n");