]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Fix the pseudo-penalty hack that doesn't work properly
authorDaniel De Graaf <danieldg@inspircd.org>
Sun, 5 Sep 2010 21:01:49 +0000 (17:01 -0400)
committerDaniel De Graaf <danieldg@inspircd.org>
Sun, 5 Sep 2010 21:03:07 +0000 (17:03 -0400)
src/userprocess.cpp
src/users.cpp

index ee9c75bc0b9eb9061abc8edb21e3b5caddd6a85c..2792a28dc0d1f76a72ecfa03635a96e703218be7 100644 (file)
@@ -55,7 +55,7 @@ void InspIRCd::DoBackgroundUserStuff()
                if (curr->quitting)
                        continue;
 
-               if (curr->CommandFloodPenalty)
+               if (curr->CommandFloodPenalty || curr->eh.getSendQSize())
                {
                        unsigned int rate = curr->MyClass->GetCommandRate();
                        if (curr->CommandFloodPenalty > rate)
index 2bd96ac90fc5e7385a028db8822a8430efcc9e2e..5ff890fd7f1072e3e09e0f971e2c88c97d46f68a 100644 (file)
@@ -513,9 +513,6 @@ eol_found:
                if (user->quitting)
                        return;
        }
-       // Add pseudo-penalty so that we continue processing after sendq recedes
-       if (user->CommandFloodPenalty == 0 && getSendQSize() >= sendqmax)
-               user->CommandFloodPenalty++;
        if (user->CommandFloodPenalty >= penaltymax && !user->MyClass->fakelag)
                ServerInstance->Users->QuitUser(user, "Excess Flood");
 }