X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/50769b45008e7da2cce41d918ec2f0fd5204fe46..e2791d9aef50f35848ab391454048b3e01e1907b:/projects/stargazer/users.cpp?ds=inline diff --git a/projects/stargazer/users.cpp b/projects/stargazer/users.cpp index 9a219be6..068193ef 100644 --- a/projects/stargazer/users.cpp +++ b/projects/stargazer/users.cpp @@ -352,9 +352,6 @@ return NULL; //----------------------------------------------------------------------------- void USERS::NewMinute(const struct tm * t) { -int usersCnt = 0; -list::iterator usr; - //Write traff, reset session traff. Fake disconnect-connect if (t->tm_hour == 23 && t->tm_min == 59) { @@ -365,11 +362,10 @@ if (t->tm_hour == 23 && t->tm_min == 59) if (TimeToWriteDetailStat(t)) { //printfd(__FILE__, "USER::WriteInetStat\n"); - //for_each(users.begin(), users.end(), mem_fun_ref(&USER::SwapDetailStat)); - usersCnt = 0; + int usersCnt = 0; // ðÉÛÅÍ ÀÚÅÒÏ× ÞÁÓÔÑÍÉ. ÷ ÐÅÒÅÒÙ×ÁÈ ×ÙÚÙ×ÁÅÍ USER::Run - usr = users.begin(); + list::iterator usr = users.begin(); while (usr != users.end()) { usersCnt++; @@ -378,8 +374,6 @@ if (TimeToWriteDetailStat(t)) if (usersCnt % 10 == 0) for_each(users.begin(), users.end(), mem_fun_ref(&USER::Run)); } - - //for_each(users.begin(), users.end(), mem_fun_ref(&USER::ResetDetailStat)); } RealDelUser(); @@ -495,7 +489,6 @@ if (isRunning) printfd(__FILE__, "Before USERS::Run()\n"); for_each(users.begin(), users.end(), mem_fun_ref(&USER::Run)); -//for_each(users.begin(), users.end(), mem_fun_ref(&USER::SwapDetailStat)); for_each(users.begin(), users.end(), bind2nd(mem_fun_ref(&USER::WriteDetailStat), true)); for_each(users.begin(), users.end(), mem_fun_ref(&USER::WriteStat)); for_each(users.begin(), users.end(), mem_fun_ref(&USER::WriteConf)); @@ -753,16 +746,3 @@ switch (statTime) } return false; } -//----------------------------------------------------------------------------- -/*int USERS::SendMessage(const string & login, - time_t sndTtime, - time_t showTime, - char type, - const string & text) const -{ -return 0; -}*/ -//----------------------------------------------------------------------------- - - -