]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/command_parse.cpp
This works with multiple remote includes now except it hangs when an include is withi...
[user/henk/code/inspircd.git] / src / command_parse.cpp
index 9df7f4754150f410a1cc68319025b898065de8ca..5492e26b5d54717ca44799b40f4cb2d389ab47cd 100644 (file)
@@ -223,22 +223,25 @@ void CommandParser::DoLines(User* current, bool one_only)
 
        while (current->BufferIsReady())
        {
-               if (ServerInstance->Time() > current->reset_due)
+               if (current->MyClass)
                {
-                       current->reset_due = ServerInstance->Time() + current->MyClass->GetThreshold();
-                       current->lines_in = 0;
-               }
+                       if (ServerInstance->Time() > current->reset_due)
+                       {
+                               current->reset_due = ServerInstance->Time() + current->MyClass->GetThreshold();
+                               current->lines_in = 0;
+                       }
 
-               if (++current->lines_in > current->MyClass->GetFlood() && current->MyClass->GetFlood())
-               {
-                       ServerInstance->FloodQuitUser(current);
-                       return;
-               }
+                       if (++current->lines_in > current->MyClass->GetFlood() && current->MyClass->GetFlood())
+                       {
+                               ServerInstance->FloodQuitUser(current);
+                               return;
+                       }
 
-               if ((++floodlines > current->MyClass->GetFlood()) && (current->MyClass->GetFlood() != 0))
-               {
-                       ServerInstance->FloodQuitUser(current);
-                       return;
+                       if ((++floodlines > current->MyClass->GetFlood()) && (current->MyClass->GetFlood() != 0))
+                       {
+                               ServerInstance->FloodQuitUser(current);
+                               return;
+                       }
                }
 
                // use GetBuffer to copy single lines into the sanitized string
@@ -305,7 +308,9 @@ bool CommandParser::ProcessCommand(User *user, std::string &cmd)
        }
 
        /* activity resets the ping pending timer */
-       user->nping = ServerInstance->Time() + user->MyClass->GetPingTime();
+       if (user->MyClass)
+               user->nping = ServerInstance->Time() + user->MyClass->GetPingTime();
+
        if (cm->second->flags_needed)
        {
                if (!user->IsModeSet(cm->second->flags_needed))