]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/userprocess.cpp
Fix segfault in m_chanprotect when OnAccessCheck is called with a null channel
[user/henk/code/inspircd.git] / src / userprocess.cpp
index 30260f23eef69effe25281d90415689c13d7b992..4fcf87f66e5db1c28113630334d47b940fc49b9a 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.
@@ -107,7 +107,7 @@ void ProcessUserHandler::Call(User* cu)
                        }
 
                        /* If user is over penalty, dont process here, just build up */
-                       if (!current->Penalty < 10)
+                       if (current->Penalty < 10)
                                Server->Parser->DoLines(current);
 
                        return;
@@ -142,9 +142,11 @@ void InspIRCd::DoBackgroundUserStuff()
        /*
         * loop over all local users..
         */
-       for (std::vector<User*>::iterator count2 = this->Users->local_users.begin(); count2 != this->Users->local_users.end(); count2++)
+       std::vector<User*>::reverse_iterator count2 = this->Users->local_users.rbegin();
+       while (count2 != this->Users->local_users.rend())
        {
                User *curr = *count2;
+               count2++;
 
                if (curr->quitting)
                        continue;