summaryrefslogtreecommitdiff
path: root/src/userprocess.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-10-21 14:25:25 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-10-21 14:25:25 +0000
commit56787e7daee68e0dec16874faeebb728964413e5 (patch)
treee5929694659f9238c2b0143b23730ba743b1e40d /src/userprocess.cpp
parent317c0288c8d98750d47a98fdc0af1691089279d2 (diff)
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
Diffstat (limited to 'src/userprocess.cpp')
-rw-r--r--src/userprocess.cpp17
1 files 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))