]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Yay, all works!
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>
Sun, 21 Oct 2007 14:18:43 +0000 (14:18 +0000)
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>
Sun, 21 Oct 2007 14:18:43 +0000 (14:18 +0000)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8251 e03df62e-2008-0410-955e-edbf42e46eb7

src/command_parse.cpp
src/userprocess.cpp

index f3ff69c9601e1c035f8272f4eebfd71f1149ac96..1701a7366af5aeb3575bb5d85a71fd15a693b46f 100644 (file)
@@ -304,9 +304,13 @@ bool CommandParser::ProcessCommand(User *user, std::string &cmd)
 
        /* Modify the user's penalty */
        user->Penalty += cm->second->Penalty;
+       ServerInstance->Log(DEBUG,"Penalty for %s is now incremented to %d (%d added on)", user->nick, user->Penalty, cm->second->Penalty);
        bool do_more = (user->Penalty < 10);
-       if (do_more)
+       if (!do_more)
+       {
                user->OverPenalty = true;
+               ServerInstance->Log(DEBUG,"User %s now OVER penalty of 10", user->nick);
+       }
 
        /* activity resets the ping pending timer */
        user->nping = ServerInstance->Time() + user->pingmax;
index 75f0da0ee48e166e8aab79c03fd844753fdb53ff..b65d566f86574fd2c88fef2960bef8a1a74e8081 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;
                }
@@ -161,11 +163,15 @@ 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)
                                curr->OverPenalty = false;