diff options
| author | 2011-05-23 21:52:52 -0400 | |
|---|---|---|
| committer | 2011-05-23 21:52:52 -0400 | |
| commit | cbbd56b8290f6569a815cf05ca7bd79279fa1b94 (patch) | |
| tree | 52ee08e82faf1abe863b1635ac7acafc2e1ffc49 /src/users.cpp | |
| parent | Change InspIRCd::Run() to return void (diff) | |
Fix recursion of QuitUser in SendQ quits
Diffstat (limited to 'src/users.cpp')
| -rw-r--r-- | src/users.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
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; } |
