]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/userprocess.cpp
Move some stuff around so the last penalty line doesnt get held erroneously until...
[user/henk/code/inspircd.git] / src / userprocess.cpp
index b65d566f86574fd2c88fef2960bef8a1a74e8081..68c469aacd7a344c1f1d6810caac285ac0fa71e9 100644 (file)
@@ -162,18 +162,16 @@ void InspIRCd::DoBackgroundUserStuff()
        {
                User *curr = *count2;
 
-               if (curr->OverPenalty)
+               if (curr->Penalty)
                {
-                       Log(DEBUG,"Process line over penalty for %s", curr->nick);
-                       Parser->DoLines(curr, true);
+                       curr->Penalty--;
+                       if (curr->Penalty < 10)
+                               Parser->DoLines(curr, true);
                }
 
-               /* Knock a second off */
-               if (curr->Penalty)
+               if (curr->OverPenalty)
                {
-                       Log(DEBUG,"Penalty for %s decremented to %d", curr->nick, curr->Penalty);
-                       curr->Penalty--;
-                       if (!curr->Penalty)
+                       if (curr->sendq.empty())
                                curr->OverPenalty = false;
                }