diff options
Diffstat (limited to 'src/userprocess.cpp')
-rw-r--r-- | src/userprocess.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/userprocess.cpp b/src/userprocess.cpp index 8aa76a1fd..781f8ae52 100644 --- a/src/userprocess.cpp +++ b/src/userprocess.cpp @@ -55,9 +55,13 @@ void InspIRCd::DoBackgroundUserStuff() if (curr->quitting) continue; - if (curr->Penalty) + if (curr->CommandFloodPenalty) { - curr->Penalty--; + unsigned int rate = curr->MyClass->GetCommandRate(); + if (curr->CommandFloodPenalty > rate) + curr->CommandFloodPenalty -= rate; + else + curr->CommandFloodPenalty = 0; curr->eh.OnDataReady(); } |