Minor fixes to CLE stale system

This commit is contained in:
KimLS 2019-07-25 22:26:56 -07:00
parent 23a187f6c1
commit 212f8a3062
6 changed files with 9 additions and 11 deletions

View File

@ -88,7 +88,6 @@ extern volatile bool UCSServerAvailable_;
Client::Client(EQStreamInterface* ieqs) Client::Client(EQStreamInterface* ieqs)
: autobootup_timeout(RuleI(World, ZoneAutobootTimeoutMS)), : autobootup_timeout(RuleI(World, ZoneAutobootTimeoutMS)),
CLE_keepalive_timer(RuleI(World, ClientKeepaliveTimeoutMS)),
connect(1000), connect(1000),
eqs(ieqs) eqs(ieqs)
{ {
@ -1124,10 +1123,9 @@ bool Client::Process() {
SendApproveWorld(); SendApproveWorld();
connect.Disable(); connect.Disable();
} }
if (CLE_keepalive_timer.Check()) {
if (cle) if (cle)
cle->KeepAlive(); cle->KeepAlive();
}
/************ Get all packets from packet manager out queue and process them ************/ /************ Get all packets from packet manager out queue and process them ************/
EQApplicationPacket *app = 0; EQApplicationPacket *app = 0;

View File

@ -94,7 +94,6 @@ private:
void SetClassLanguages(PlayerProfile_Struct *pp); void SetClassLanguages(PlayerProfile_Struct *pp);
ClientListEntry* cle; ClientListEntry* cle;
Timer CLE_keepalive_timer;
Timer connect; Timer connect;
bool firstlogin; bool firstlogin;
bool seen_character_select; bool seen_character_select;

View File

@ -273,8 +273,8 @@ bool ClientListEntry::CheckStale() {
if (stale > 20) { if (stale > 20) {
if (pOnline > CLE_Status::Offline) if (pOnline > CLE_Status::Offline)
SetOnline(CLE_Status::Offline); SetOnline(CLE_Status::Offline);
else
return true; return true;
} }
return false; return false;
} }

View File

@ -41,7 +41,7 @@ extern ZSList zoneserver_list;
uint32 numplayers = 0; //this really wants to be a member variable of ClientList... uint32 numplayers = 0; //this really wants to be a member variable of ClientList...
ClientList::ClientList() ClientList::ClientList()
: CLStale_timer(45000) : CLStale_timer(10000)
{ {
NextCLEID = 1; NextCLEID = 1;

View File

@ -1166,8 +1166,8 @@ void Client::Handle_Connect_OP_ZoneEntry(const EQApplicationPacket *app)
*/ */
Client* client = entity_list.GetClientByName(cze->char_name); Client* client = entity_list.GetClientByName(cze->char_name);
if (!zone->GetAuth(ip, cze->char_name, &WID, &account_id, &character_id, &admin, lskey, &tellsoff)) { if (!zone->GetAuth(ip, cze->char_name, &WID, &account_id, &character_id, &admin, lskey, &tellsoff)) {
Log(Logs::General, Logs::Error, "GetAuth() returned false kicking client"); Log(Logs::General, Logs::Client_Login, "%s failed zone auth check.", cze->char_name);
if (client != 0) { if (nullptr != client) {
client->Save(); client->Save();
client->Kick(); client->Kick();
} }

View File

@ -1138,6 +1138,7 @@ void Zone::RemoveAuth(uint32 lsid)
ZoneClientAuth_Struct* zca = iterator.GetData(); ZoneClientAuth_Struct* zca = iterator.GetData();
if (zca->lsid == lsid) { if (zca->lsid == lsid) {
iterator.RemoveCurrent(); iterator.RemoveCurrent();
continue;
} }
iterator.Advance(); iterator.Advance();
} }