mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-15 08:21:28 +00:00
Mark old cle entries as stale when you login
This commit is contained in:
parent
186834594f
commit
780f8f8515
@ -1277,7 +1277,19 @@ void ClientList::UpdateClientGuild(uint32 char_id, uint32 guild_id) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ClientList::RemoveCLEByLSID(uint32 iLSID)
|
||||||
|
{
|
||||||
|
LinkedListIterator<ClientListEntry*> iterator(clientlist);
|
||||||
|
|
||||||
|
iterator.Reset();
|
||||||
|
while (iterator.MoreElements()) {
|
||||||
|
if (iterator.GetData()->LSAccountID() == iLSID) {
|
||||||
|
iterator.RemoveCurrent();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
iterator.Advance();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
int ClientList::GetClientCount() {
|
int ClientList::GetClientCount() {
|
||||||
return(numplayers);
|
return(numplayers);
|
||||||
|
|||||||
@ -66,6 +66,7 @@ public:
|
|||||||
void CLEKeepAlive(uint32 numupdates, uint32* wid);
|
void CLEKeepAlive(uint32 numupdates, uint32* wid);
|
||||||
void CLEAdd(uint32 iLSID, const char* iLoginName, const char* iLoginKey, int16 iWorldAdmin = 0, uint32 ip = 0, uint8 local=0);
|
void CLEAdd(uint32 iLSID, const char* iLoginName, const char* iLoginKey, int16 iWorldAdmin = 0, uint32 ip = 0, uint8 local=0);
|
||||||
void UpdateClientGuild(uint32 char_id, uint32 guild_id);
|
void UpdateClientGuild(uint32 char_id, uint32 guild_id);
|
||||||
|
void RemoveCLEByLSID(uint32 iLSID);
|
||||||
|
|
||||||
int GetClientCount();
|
int GetClientCount();
|
||||||
void GetClients(const char *zone_name, std::vector<ClientListEntry *> &into);
|
void GetClients(const char *zone_name, std::vector<ClientListEntry *> &into);
|
||||||
|
|||||||
@ -109,11 +109,15 @@ void LoginServer::ProcessUsertoWorldReq(uint16_t opcode, EQ::Net::Packet &p) {
|
|||||||
auto cle = client_list.FindCLEByLSID(utwr->lsaccountid);
|
auto cle = client_list.FindCLEByLSID(utwr->lsaccountid);
|
||||||
if (cle != nullptr) {
|
if (cle != nullptr) {
|
||||||
auto status = cle->GetOnline();
|
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;
|
utwrs->response = UserToWorldStatusAlreadyOnline;
|
||||||
SendPacket(&outpack);
|
SendPacket(&outpack);
|
||||||
return;
|
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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user