]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/userprocess.cpp
Update all wiki links to point to the new wiki. This was done automatically with...
[user/henk/code/inspircd.git] / src / userprocess.cpp
index fe6a25c251535b0d1a81ed1d8e99a79ed39abd29..d66e548c9e3e2f894975267e153704097bc177a9 100644 (file)
@@ -2,8 +2,8 @@
  *       | Inspire Internet Relay Chat Daemon |
  *       +------------------------------------+
  *
- *  InspIRCd: (C) 2002-2008 InspIRCd Development Team
- * See: http://www.inspircd.org/wiki/index.php/Credits
+ *  InspIRCd: (C) 2002-2009 InspIRCd Development Team
+ * See: http://wiki.inspircd.org/Credits
  *
  * This program is free but copyrighted software; see
  *            the file COPYING for details.
@@ -14,7 +14,6 @@
 /* $Core */
 
 #include "inspircd.h"
-#include "wildcard.h"
 #include "xline.h"
 #include "socketengine.h"
 #include "command_parse.h"
@@ -46,14 +45,14 @@ void ProcessUserHandler::Call(User* cu)
 
        char* ReadBuffer = Server->GetReadBuffer();
 
-       if (cu->io)
+       if (cu->GetIOHook())
        {
                int result2 = 0;
                int MOD_RESULT = 0;
 
                try
                {
-                       MOD_RESULT = cu->io->OnRawSocketRead(cu->GetFd(), ReadBuffer, Server->Config->NetBufferSize, result2);
+                       MOD_RESULT = cu->GetIOHook()->OnRawSocketRead(cu->GetFd(), ReadBuffer, Server->Config->NetBufferSize, result2);
                }
                catch (CoreException& modexcept)
                {
@@ -103,36 +102,12 @@ 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;
                        }
 
                        /* If user is over penalty, dont process here, just build up */
-                       if (!current->OverPenalty)
+                       if (current->Penalty < 10)
                                Server->Parser->DoLines(current);
 
                        return;
@@ -181,12 +156,6 @@ void InspIRCd::DoBackgroundUserStuff()
                                Parser->DoLines(curr, true);
                }
 
-               if (curr->OverPenalty)
-               {
-                       if (curr->sendq.empty())
-                               curr->OverPenalty = false;
-               }
-
                switch (curr->registered)
                {
                        case REG_ALL: