PDA

View Full Version : Submission: IP Limiting Minor Fix


trevius
09-24-2008, 08:02 PM
I noticed that setting the exempt status for accounts doesn't actually work to make that status exempt in the current version of IP Limiting. You have to set it 1 higher status on the account than what you set the rule to for it to be exempt. This is misleading and not how I think it is supposed to work. The reason is here in RED:

world/clientlist.cpp
if ((countCLEIPs->GetIP() == iIP) && ((countCLEIPs->Admin() <= (RuleI(World, ExemptMaxClientsStatus))) || (RuleI(World, ExemptMaxClientsStatus) < 0))) {


And I believe the fix is simple. Just change the <= into a < as shown here in RED:
if ((countCLEIPs->GetIP() == iIP) && ((countCLEIPs->Admin() < (RuleI(World, ExemptMaxClientsStatus))) || (RuleI(World, ExemptMaxClientsStatus) < 0))) {

That is a pretty minor fix, but a valid one IMO.