diff --git a/world/clientlist.cpp b/world/clientlist.cpp index c0e6a5116..2614d1d71 100644 --- a/world/clientlist.cpp +++ b/world/clientlist.cpp @@ -1245,15 +1245,16 @@ void ClientList::UpdateClientGuild(uint32 char_id, uint32 guild_id) { void ClientList::RemoveCLEByLSID(uint32 iLSID) { - LinkedListIterator iterator(clientlist); + LinkedListIterator iterator(clientlist); iterator.Reset(); while (iterator.MoreElements()) { if (iterator.GetData()->LSAccountID() == iLSID) { iterator.RemoveCurrent(); } - else + else { iterator.Advance(); + } } } diff --git a/world/login_server.cpp b/world/login_server.cpp index 074a270ca..78c736a0c 100644 --- a/world/login_server.cpp +++ b/world/login_server.cpp @@ -180,11 +180,15 @@ void LoginServer::ProcessUsertoWorldReq(uint16_t opcode, EQ::Net::Packet &p) auto cle = client_list.FindCLEByLSID(utwr->lsaccountid); if (cle != nullptr) { auto status = cle->GetOnline(); - if (CLE_Status_Never != status && CLE_Status_Offline != status) { + if (CLE_Status_Zoning == status || CLE_Status_InZone == status) { utwrs->response = UserToWorldStatusAlreadyOnline; SendPacket(&outpack); return; } + else { + //our existing cle is in a state we can login to, mark the old as stale and remove it. + client_list.RemoveCLEByLSID(utwr->lsaccountid); + } } }