From cbbd56b8290f6569a815cf05ca7bd79279fa1b94 Mon Sep 17 00:00:00 2001 From: Jackmcbarn Date: Mon, 23 May 2011 21:52:52 -0400 Subject: Fix recursion of QuitUser in SendQ quits --- src/users.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'src/users.cpp') diff --git a/src/users.cpp b/src/users.cpp index 61ec6defb..245a044c9 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -12,6 +12,7 @@ */ #include "inspircd.h" +#include "cull_list.h" #include "command_parse.h" #include "dns.h" #include "inspsocket.h" @@ -526,16 +527,13 @@ eol_found: void UserIOHandler::AddWriteBuf(const std::string &data) { + if (user->quitting_sendq) + return; size_t len = getSendQSize() + data.length(); if (!user->quitting && len > user->MyClass->hardsendqmax) { - /* - * Quit the user FIRST, because otherwise we could recurse - * here and hit the same limit. - */ - ServerInstance->Users->QuitUser(user, "SendQ exceeded"); - ServerInstance->SNO->WriteToSnoMask('a', "User %s SendQ exceeds maximum of %lu (class %s)", - user->nick.c_str(), user->MyClass->hardsendqmax, user->MyClass->name.c_str()); + user->quitting_sendq = true; + ServerInstance->GlobalCulls->AddSQItem(user); return; } -- cgit v1.3.1-10-gc9f91