--- innwebd/bbsd.cpp 2004/07/03 05:34:51 1.2 +++ innwebd/bbsd.cpp 2004/09/16 15:38:59 1.7 @@ -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 */ @@ -39,7 +39,9 @@ int bbsd::Accept(void) try { 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()) { @@ -49,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()) { @@ -78,16 +82,20 @@ int bbsd::Accept(void) "注册用户数[\033[36m%ld\033[32m]\r\n" "\033[1;37m本站目前尚未开设telnet服务 请使用Web方式访问\r\n\r\n" "\033[1;32m http://%s \033[m\r\n", - this->innd_name,u_online,MAX_THREAD,u_anonymous,u_total, + this->innd_name,u_online,MAX_CLIENT,u_anonymous,u_total, this->innd_server,this->innd_server); this->s_send(out); while(!this->thread_terminate) { + this->GetParentThread()->GetThreadPool()->SetThreadStatus(GetCurrentThreadId(),thread_pool::S_WAITING); + if (this->s_receive(out) == 0) //Connection closed break; out.Trim(); + this->GetParentThread()->GetThreadPool()->SetThreadStatus(GetCurrentThreadId(),thread_pool::S_WORKING); + if (sscanf(out,"%20s",temp) ==1) cmd = strupr(temp); else @@ -159,3 +167,8 @@ int bbsd::db_env_init(void) } return 0; } + +bool bbsd::check_priv(void) +{ + return true; +}