--- innwebd/bbsd.cpp 2004/07/03 13:56:04 1.4 +++ innwebd/bbsd.cpp 2004/07/09 22:58:45 1.6 @@ -1,10 +1,10 @@ /*******************************************************/ /* */ -/* LeafOK Innd */ +/* LeafOK Innbbsd */ /* Copyright (C) LeafOK.com, 2003-2004 */ /* */ /* Programmed by Leaf */ -/* E-mail:leaf@leafok.com QQ:6049044 */ +/* E-mail:leaflet@leafok.com QQ:6049044 */ /* */ /* http://bbs.leafok.com */ /* http://bbs.leafok.net */ @@ -34,15 +34,14 @@ int bbsd::Accept(void) CDBVariant dbVar; CString sql,out,cmd; char temp[256]; - HANDLE hThreadCurrent; long u_online,u_anonymous,u_total; try { - hThreadCurrent = GetCurrentThread(); - u_online = 0; - sql = "select SID as cc from user_online group by SID"; + sql = "select SID as cc from user_online where current_action not in" + " ('max_user_limit','max_ip_limit','max_session_limit','exit')" + " group by SID"; RS.Open(CRecordset::snapshot,sql,CRecordset::forwardOnly | CRecordset::readOnly); while(!RS.IsEOF()) { @@ -52,7 +51,9 @@ int bbsd::Accept(void) RS.Close(); u_anonymous = 0; - sql = "select SID as cc from user_online where UID=0 group by SID"; + sql = "select SID as cc from user_online where UID=0 and current_action not in" + " ('max_user_limit','max_ip_limit','max_session_limit','exit')" + " group by SID"; RS.Open(CRecordset::snapshot,sql,CRecordset::forwardOnly | CRecordset::readOnly); while(!RS.IsEOF()) { @@ -87,13 +88,13 @@ int bbsd::Accept(void) this->s_send(out); while(!this->thread_terminate) { - this->GetParentThread()->GetThreadPool()->SetThreadStatus(hThreadCurrent,thread_pool::S_WAITING); + this->GetParentThread()->GetThreadPool()->SetThreadStatus(GetCurrentThreadId(),thread_pool::S_WAITING); if (this->s_receive(out) == 0) //Connection closed break; out.Trim(); - this->GetParentThread()->GetThreadPool()->SetThreadStatus(hThreadCurrent,thread_pool::S_WORKING); + this->GetParentThread()->GetThreadPool()->SetThreadStatus(GetCurrentThreadId(),thread_pool::S_WORKING); if (sscanf(out,"%20s",temp) ==1) cmd = strupr(temp);