From 56787e7daee68e0dec16874faeebb728964413e5 Mon Sep 17 00:00:00 2001 From: brain Date: Sun, 21 Oct 2007 14:25:25 +0000 Subject: Tweak so that commands with larger penalty than 1 work right git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8252 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/userprocess.cpp | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/src/userprocess.cpp b/src/userprocess.cpp index b65d566f8..41c5ae4cd 100644 --- a/src/userprocess.cpp +++ b/src/userprocess.cpp @@ -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)) -- cgit v1.2.3