]> 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 75f0da0ee48e166e8aab79c03fd844753fdb53ff..68c469aacd7a344c1f1d6810caac285ac0fa71e9 100644 (file)
@@ -122,7 +122,9 @@ void ProcessUserHandler::Call(User* cu)
                                return;
                        }
 
-                       Server->Parser->DoLines(current);
+                       /* If user is over penalty, dont process here, just build up */
+                       if (!current->OverPenalty)
+                               Server->Parser->DoLines(current);
 
                        return;
                }
@@ -160,14 +162,16 @@ void InspIRCd::DoBackgroundUserStuff()
        {
                User *curr = *count2;
 
-               if (curr->OverPenalty)
-                       Parser->DoLines(curr, true);
-
-               /* Knock a second off */
                if (curr->Penalty)
                {
                        curr->Penalty--;
-                       if (!curr->Penalty)
+                       if (curr->Penalty < 10)
+                               Parser->DoLines(curr, true);
+               }
+
+               if (curr->OverPenalty)
+               {
+                       if (curr->sendq.empty())
                                curr->OverPenalty = false;
                }