summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.inspircd.inc2
-rw-r--r--src/users.cpp7
2 files changed, 7 insertions, 2 deletions
diff --git a/.inspircd.inc b/.inspircd.inc
index a3df44eac..05cbe0ea0 100644
--- a/.inspircd.inc
+++ b/.inspircd.inc
@@ -261,7 +261,7 @@ sub cmd_stop()
# Get to here, we have something to kill.
my $pid = getprocessid();
print "Stopping InspIRCd (pid: $pid)...\n";
- my $maxwait = (`ps -o command $pid` =~ /valgrind/i) ? 90 : 5;
+ my $maxwait = (`ps -o command $pid` =~ /valgrind/i) ? 90 : 15;
kill TERM => $pid or die "Cannot terminate IRCd: $!\n";
for (1..$maxwait) {
sleep 1;
diff --git a/src/users.cpp b/src/users.cpp
index 1675b621b..616592495 100644
--- a/src/users.cpp
+++ b/src/users.cpp
@@ -515,8 +515,11 @@ void User::OnDataReady()
unsigned long sendqmax = ULONG_MAX;
if (MyClass && !HasPrivPermission("users/flood/increased-buffers"))
sendqmax = MyClass->GetSendqSoftMax();
+ int penaltymax = MyClass->GetPenaltyThreshold();
+ if (penaltymax == 0 || HasPrivPermission("users/flood/no-fakelag"))
+ penaltymax = INT_MAX;
- while (Penalty < 10 && getSendQSize() < sendqmax)
+ while (Penalty < penaltymax && getSendQSize() < sendqmax)
{
std::string line;
line.reserve(MAXBUF);
@@ -549,6 +552,8 @@ eol_found:
this->cmds_in++;
ServerInstance->Parser->ProcessBuffer(line, this);
+ if (quitting)
+ return;
}
// Add pseudo-penalty so that we continue processing after sendq recedes
if (Penalty == 0 && getSendQSize() >= sendqmax)