Quote:
Originally Posted by trevius
|
I've just been looking over the changes to clientlist.cpp in that thread and I think the logic is flawed if that is how you have it coded:
Code:
if (IPInstances > (RuleI(World, MaxClientsPerIP))){
countCLEIPs->SetOnline(CLE_Status_Offline);
iterator.RemoveCurrent();
}
}
countCLEIPs->SetOnline(CLE_Status_Offline);
iterator.RemoveCurrent();
If the code reaches the most deepy nested iterator.RemoveCurrent(), then not only will it it remove the ClientList entry of the connection exceeding the IP limit, but the iterator will be updated to point to the next entry in the ClientList (which probably belongs to someone else), and the flow of execution will then reach the second iterator.RemoveCurrent() and remove that one as well.
My head's hurting from looking at it, so maybe I am misunderstanding the intention of the code.