]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Tweak so that commands with larger penalty than 1 work right
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>
Sun, 21 Oct 2007 14:25:25 +0000 (14:25 +0000)
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>
Sun, 21 Oct 2007 14:25:25 +0000 (14:25 +0000)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8252 e03df62e-2008-0410-955e-edbf42e46eb7

src/userprocess.cpp

index b65d566f86574fd2c88fef2960bef8a1a74e8081..41c5ae4cd73b78941dc8d5c5e16ad94e6d39a553 100644 (file)
@@ -162,19 +162,16 @@ void InspIRCd::DoBackgroundUserStuff()
        {
                User *curr = *count2;
 
-               if (curr->OverPenalty)
-               {
-                       Log(DEBUG,"Process line over penalty for %s", curr->nick);
-                       Parser->DoLines(curr, true);
-               }
-
-               /* Knock a second off */
                if (curr->Penalty)
-               {
-                       Log(DEBUG,"Penalty for %s decremented to %d", curr->nick, curr->Penalty);
                        curr->Penalty--;
-                       if (!curr->Penalty)
+
+               if (curr->OverPenalty)
+               {
+                       if (curr->sendq.empty())
                                curr->OverPenalty = false;
+
+                       if (curr->Penalty < 10)
+                               Parser->DoLines(curr, true);
                }
 
                if ((curr->registered != REG_ALL) && (TIME > curr->timeout))