mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-16 18:52:22 +00:00
Merge remote-tracking branch 'origin' into lsid
This commit is contained in:
@@ -1243,7 +1243,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() {
|
||||
return(numplayers);
|
||||
|
||||
@@ -64,6 +64,7 @@ public:
|
||||
void CLEKeepAlive(uint32 numupdates, uint32* wid);
|
||||
void CLEAdd(uint32 iLSID, const char* iLoginServerName, const char* iLoginName, const char* iLoginKey, int16 iWorldAdmin = 0, uint32 ip = 0, uint8 local=0);
|
||||
void UpdateClientGuild(uint32 char_id, uint32 guild_id);
|
||||
void RemoveCLEByLSID(uint32 iLSID);
|
||||
|
||||
int GetClientCount();
|
||||
void GetClients(const char *zone_name, std::vector<ClientListEntry *> &into);
|
||||
|
||||
@@ -112,11 +112,15 @@ void LoginServer::ProcessUsertoWorldReqLeg(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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -409,12 +409,12 @@ void ZoneServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p) {
|
||||
if (pack->size < sizeof(ServerChannelMessage_Struct))
|
||||
break;
|
||||
ServerChannelMessage_Struct* scm = (ServerChannelMessage_Struct*)pack->pBuffer;
|
||||
if (scm->chan_num == 20)
|
||||
if (scm->chan_num == ChatChannel_UCSRelay)
|
||||
{
|
||||
UCSLink.SendMessage(scm->from, scm->message);
|
||||
break;
|
||||
}
|
||||
if (scm->chan_num == 7 || scm->chan_num == 14) {
|
||||
if (scm->chan_num == ChatChannel_Tell || scm->chan_num == ChatChannel_TellEcho) {
|
||||
if (scm->deliverto[0] == '*') {
|
||||
|
||||
if (console) {
|
||||
@@ -486,7 +486,8 @@ void ZoneServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p) {
|
||||
cle->Server()->SendPacket(pack);
|
||||
}
|
||||
else {
|
||||
if (scm->chan_num == 5 || scm->chan_num == 6 || scm->chan_num == 11) {
|
||||
if (scm->chan_num == ChatChannel_OOC || scm->chan_num == ChatChannel_Broadcast
|
||||
|| scm->chan_num == ChatChannel_GMSAY) {
|
||||
if (console) {
|
||||
console->SendChannelMessage(scm, [&scm]() {
|
||||
auto pack = new ServerPacket(ServerOP_ChannelMessage,
|
||||
|
||||
Reference in New Issue
Block a user