View Single Post
  #12  
Old 04-02-2008, 06:03 PM
TheLieka
Developer
 
Join Date: Oct 2004
Location: THE ATL (wut wut)
Posts: 325
Default

I was double checking this submission against the current release, and saw that I had a couple of issues with it. Here are the corrections. Sorry about that.

This portion had a typo in it:
.\world\clientlist.cpp

After:

Code:
void ClientList::CLERemoveZSRef(ZoneServer* iZS) {
	LinkedListIterator<ClientListEntry*> iterator(clientlist);

	iterator.Reset();
	while(iterator.MoreElements()) {
		if (iterator.GetData()->Server() == iZS) {
			iterator.GetData()->ClearServer(); // calling this before LeavingZone() makes CLE not update the number of players in a zone
			iterator.GetData()->LeavingZone();
		}
		iterator.Advance();
	}
}

ClientListEntry* ClientList::GetCLE(int32 iID) {
	LinkedListIterator<ClientListEntry*> iterator(clientlist);


	iterator.Reset();
	while(iterator.MoreElements()) {
		if (iterator.GetData()->GetID() == iID) {
			return iterator.GetData();
		}
		iterator.Advance();
	}
	return 0;
}


Add:

Code:
 //Lieka Edit Begin:  Check current CLE Entry IPs against incoming connection

void ClientList::GetCLEIP(int32 iIP) {
	ClientListEntry* countCLEIPs = 0;
	LinkedListIterator<ClientListEntry*> iterator(clientlist);

	int IPInstances = 0;
	iterator.Reset();
	while(iterator.MoreElements()) {
		countCLEIPs = iterator.GetData();
		if ((countCLEIPs->GetIP() == iIP) && ((countCLEIPs->Admin() <= (RuleI(World, ExemptMaxClientsStatus))) || (RuleI(World, ExemptMaxClientsStatus) < 0))) {
			IPInstances++;
			if (IPInstances > (RuleI(World, MaxClientsPerIP))){
				countCLEIPs->SetOnline(CLE_Status_Offline);
				iterator.RemoveCurrent();
			}
		}
		iterator.Advance();
	}
}
//Lieka Edit End
I left this part out:
.\world\clientlist.h

After:

Code:
#include "../common/eq_packet_structs.h"
#include "../common/linked_list.h"
#include "../common/timer.h"
Add:
Code:
#include "../common/rulesys.h"
Dax
__________________
Daxum



Former ServerOp - Vallon Zek / Tallon Zek Emu Server - Legit / Guild PvP - (2007 - 2011 RIP)