From be2a677ddd01859a61f484aa8f1e5d916a8f3ca5 Mon Sep 17 00:00:00 2001 From: w00t Date: Mon, 1 Dec 2008 20:14:49 +0000 Subject: Remove lines_in and reset_due flood protection mechanism, recvq/sendq on their own now fill this role, as we have proper penalties. This tidies up *a lot* of code, and also saves a further sizeof(time_t) + sizeof(unsigned int) per user. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10838 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/userprocess.cpp | 26 +------------------------- 1 file changed, 1 insertion(+), 25 deletions(-) (limited to 'src/userprocess.cpp') diff --git a/src/userprocess.cpp b/src/userprocess.cpp index a529f4476..30260f23e 100644 --- a/src/userprocess.cpp +++ b/src/userprocess.cpp @@ -102,31 +102,7 @@ void ProcessUserHandler::Call(User* cu) if (!current->AddBuffer(ReadBuffer)) { // AddBuffer returned false, theres too much data in the user's buffer and theyre up to no good. - if (current->registered == REG_ALL) - { - if (current->MyClass) - { - // Make sure they arn't flooding long lines. - if (Server->Time() > current->reset_due) - { - current->reset_due = Server->Time() + current->MyClass->GetThreshold(); - current->lines_in = 0; - } - - current->lines_in++; - - if (current->MyClass->GetFlood() && current->lines_in > current->MyClass->GetFlood()) - Server->FloodQuitUser(current); - else - { - current->WriteServ("NOTICE %s :Your previous line was too long and was not delivered (Over %d chars) Please shorten it.", current->nick.c_str(), MAXBUF-2); - current->recvq.clear(); - } - } - } - else - Server->FloodQuitUser(current); - + Server->FloodQuitUser(current); return; } -- cgit v1.3.1-10-gc9f91