From: brain Date: Sun, 21 Oct 2007 14:25:25 +0000 (+0000) Subject: Tweak so that commands with larger penalty than 1 work right X-Git-Tag: v2.0.23~4427 X-Git-Url: https://git.netwichtig.de/gitweb/?a=commitdiff_plain;h=56787e7daee68e0dec16874faeebb728964413e5;p=user%2Fhenk%2Fcode%2Finspircd.git 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 --- 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))